Skip to content

Commit

Permalink
removed with syntax on release job
Browse files Browse the repository at this point in the history
  • Loading branch information
ninetailsrabbit committed Jun 5, 2024
1 parent 0c43d1f commit 59c3d83
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,29 +48,25 @@ jobs:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/main' # only run job if on the main branch

steps:
#Push NuGet package to GitHub packages
- name: Download nuget package artifact
uses: actions/[email protected]
with:
name: nugetPackage
path: Match3Maker/bin/Release
- name: Prep packages
run: dotnet nuget add source --username ${{ vars.USERNAME }} --password ${{ secrets.NUGET_PACKAGE_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/${{ vars.USERNAME }}/index.json"
- name: Push package to GitHub packages
if: needs.build.outputs.CommitsSinceVersionSource > 0 #Only release if there has been a commit/version change
run: dotnet nuget push nugetPackage/*.nupkg --api-key ${{ secrets.NUGET_PACKAGE_TOKEN }} --source "github"
run: dotnet nuget push Match3Maker/bin/Release/*.nupkg --api-key ${{ secrets.NUGET_PACKAGE_TOKEN }} --source "github"
# Publish to NuGet.org
- name: Publish to NuGet.org
run: dotnet nuget push nugetPackage/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate

run: dotnet nuget push Match3Maker/bin/Release/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
#Create release
- name: Create Release
if: needs.build.outputs.CommitsSinceVersionSource > 0 #Only release if there has been a commit/version change
uses: ncipollo/[email protected]
with:
tag: ${{ needs.build.outputs.Version }}
name: Release ${{ needs.build.outputs.Version }}
artifacts: "nugetPackage/*"
artifacts: "Match3Maker/bin/Release/*"
token: ${{ secrets.NUGET_PACKAGE_TOKEN }}

0 comments on commit 59c3d83

Please sign in to comment.