Skip to content

Commit a107edf

Browse files
committed
Updating gh actions build to use nuget-friendly packaging numbers
1 parent 1d3d350 commit a107edf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@ jobs:
4040
run: dotnet test -c Release
4141
- name: Pack
4242
if: matrix.os == 'ubuntu-latest'
43-
run: dotnet pack -v normal -c Release --no-restore --include-symbols --include-source -p:PackageVersion=$GITHUB_RUN_ID src/$PROJECT_NAME/$PROJECT_NAME.*proj
43+
run: |
44+
latestTag=$(git describe --tags --abbrev=0 2>/dev/null || echo 0.0.1)
45+
runId=$GITHUB_RUN_ID
46+
packageVersion="${latestTag//v}-build.${runId}"
47+
dotnet pack -v normal -c Release --no-restore --include-symbols --include-source -p:PackageVersion=$packageVersion src/$PROJECT_NAME/$PROJECT_NAME.*proj
4448
- name: Upload Artifact
4549
if: matrix.os == 'ubuntu-latest'
4650
uses: actions/upload-artifact@v2

0 commit comments

Comments
 (0)