Skip to content

Commit

Permalink
Few tweaks for NuGet packing
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberzed committed Jul 4, 2023
1 parent d732005 commit 08e45ac
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@ jobs:
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
# - uses: actions/cache@v3
# with:
# path: ~/.nuget/packages
# # Look to see if there is a cache hit for the corresponding requirements file
# key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
# restore-keys: |
# ${{ runner.os }}-nuget
- name: Restore dependencies
working-directory: ./src
run: dotnet restore
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/nuget.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
name: 'NuGet'

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest

env:
BUILD_CONFIG: 'Release'

steps:
- uses: actions/checkout@v3
- name: Verify commit exists in origin/main
Expand All @@ -23,10 +25,10 @@ jobs:
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
- name: Build
working-directory: ./src
run: dotnet build --configuration Release /p:Version=${VERSION}
run: dotnet build /p:Version=${VERSION}
- name: Test
working-directory: ./src
run: dotnet test --configuration Release /p:Version=${VERSION} --no-build
run: dotnet test /p:Version=${VERSION} --no-build
- name: Pack
working-directory: ./src
run: dotnet pack --configuration Release /p:Version=${VERSION} --no-build --output .
run: dotnet pack /p:Version=${VERSION} --no-build --output .
2 changes: 2 additions & 0 deletions src/Sleddog.Blink1/Sleddog.Blink1.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
<OutputType>Library</OutputType>
<RestorePackages>true</RestorePackages>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<RepositoryUrl>https://github.com/SleddogSoftwareDevelopment/blink1</RepositoryUrl>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="HidApi.Net" Version="0.4.0" />
<PackageReference Include="System.Reactive" Version="6.0.0" />
Expand Down

0 comments on commit 08e45ac

Please sign in to comment.