Skip to content

Commit

Permalink
NuGet: Artifact glob pattern (#10)
Browse files Browse the repository at this point in the history
* fix(#9): fixed glob, allow artifact per action

* fix(#9): Pack first

* fix(#9): Release package only
  • Loading branch information
snovak7 committed May 13, 2024
1 parent 40dbb3e commit e2e843f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,23 @@ jobs:

- name: Pack .NET Solution
run: dotnet pack --configuration Release --no-build --output pack/
if: ${{ github.event_name == 'release' && github.ref_type == 'tag' || github.event.release.tag_name }}
if: ${{ github.event_name == 'release' && github.ref_type == 'tag' || github.event.release.tag_name }}

- name: Publish .NET Solution to GitHub Packages
continue-on-error: true
run: dotnet nuget push pack/*.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
if: ${{ github.event_name == 'release' && github.ref_type == 'tag' || github.event.release.tag_name }}
if: ${{ github.event_name == 'release' && github.ref_type == 'tag' || github.event.release.tag_name }}

- name: Store .NET Package
uses: actions/upload-artifact@v4
with:
name: nuget
if-no-files-found: error
retention-days: 7
path: pack/*.(s?)nupkg
if: ${{ github.event_name == 'release' && github.ref_type == 'tag' || github.event.release.tag_name }}
path: pack/*.nupkg
if: ${{ github.event_name == 'release' && github.ref_type == 'tag' || github.event.release.tag_name }}

- name: Publish .NET Solution to NuGet.org
continue-on-error: true
run: dotnet nuget push pack/*.nupkg --api-key ${{ secrets.NUGET_ORG_KEY }} --source nuget
if: ${{ github.event_name == 'release' && github.ref_type == 'tag' || github.event.release.tag_name }}
if: ${{ github.event_name == 'release' && github.ref_type == 'tag' || github.event.release.tag_name }}

0 comments on commit e2e843f

Please sign in to comment.