Skip to content

Commit 614b24d

Browse files
committed
Fix versioning and duplicate release
1 parent 4de4bec commit 614b24d

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

.github/workflows/publish.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,23 +66,22 @@ jobs:
6666

6767
- name: Pre Build
6868
run: |
69-
dotnet build -c Release --no-restore || :
69+
dotnet build -c Release --no-restore > /dev/null 2>&1 || :
7070
7171
- name: Build
72-
run: dotnet build -c Release --no-restore
72+
run: dotnet build -c Release --no-restore -p:Version=${{ env.RELEASE_VERSION }}
7373

7474
- name: Test
7575
run: dotnet test -c Release --no-build
7676

7777
- name: Pack
7878
run: |
79-
dotnet pack -c Release --no-build --no-restore --output nupkg \
80-
--include-symbols --include-source --version-suffix ${{ github.event.inputs.version }}
79+
dotnet pack -c Release --no-build --no-restore --output nupkg --include-symbols --include-source --version-suffix ${{ env.RELEASE_VERSION }}
8180
81+
# https://github.com/microsoft/azure-pipelines-tasks/issues/1511
8282
- name: Push Packages to NuGet
8383
run: |
84-
echo "Pushing nugets in nupkg/*.nupkg"
85-
dotnet nuget push "nupkg/*.nupkg" --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }}
84+
dotnet nuget push "nupkg/*.nupkg;-:nupkg/*.symbols.nupkg" --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate
8685
8786
- name: Read Changelog Entry
8887
uses: mindsers/changelog-reader-action@v2

0 commit comments

Comments
 (0)