Skip to content

Commit

Permalink
Update publish.yml
Browse files Browse the repository at this point in the history
version string manipulation to conform with .net requirement
  • Loading branch information
VasilijP authored Oct 17, 2024
1 parent 2a909f8 commit cd79b33
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,18 @@ jobs:
- name: Build project
run: dotnet build --configuration Release --no-restore

- name: Extract version
id: get_version
shell: bash
run: |
TAG_NAME=${GITHUB_REF#refs/tags/}
VERSION=${TAG_NAME#v}
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "Extracted version: $VERSION"
- name: Pack NuGet package
run: |
dotnet pack --configuration Release --no-build --output ./artifacts
env:
NUGET_PACKAGE_VERSION: ${{ github.ref_name }}
dotnet pack --configuration Release --no-build --output ./artifacts /p:PackageVersion=${{ env.VERSION }}
- name: Publish NuGet package
run: |
Expand Down

0 comments on commit cd79b33

Please sign in to comment.