Skip to content

Commit

Permalink
Merge pull request #4 from anexia/feature/SIANXSVC-1178-github-action…
Browse files Browse the repository at this point in the history
…-does-not-use-tag-for-versioning

SIANXSVC-1178: Ensure tag gets used for NuGet versioning
  • Loading branch information
beachmachine authored Dec 14, 2023
2 parents eb55f61 + bd8bd08 commit 7bd1753
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,17 @@ jobs:
git branch --remote --contains | grep origin/main
- name: Set VERSION variable from tag
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV

- uses: actions/setup-dotnet@v3
with:
dotnet-version: "8.0.x"
cache: true
cache-dependency-path: src/**/packages.lock.json

- run: dotnet restore --locked-mode
- run: dotnet pack --no-restore --include-symbols -o . /p:Version=${VERSION}

- run: dotnet pack --no-restore --include-symbols -o . /p:PackageVersion=${VERSION}

- name: Deploy to NuGet
run: dotnet nuget push *.nupkg --api-key $NUGET_AUTH_TOKEN --source https://api.nuget.org/v3/index.json
Expand Down

0 comments on commit 7bd1753

Please sign in to comment.