-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0c43d1f
commit 59c3d83
Showing
1 changed file
with
4 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 }} |