Skip to content

Commit

Permalink
Fix oversights in publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Banane9 committed Jun 25, 2024
1 parent 8330880 commit a2af391
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ on:
tags:
- v** # Only when a v... tag is pushed

# Sets permissions of the GITHUB_TOKEN to allow reading packages and push releases
# Sets permissions of the GITHUB_TOKEN to allow writing packages and push releases
permissions:
packages: read
packages: write

env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NuGetDirectory: ${{ github.workspace}}/nuget

Expand All @@ -30,6 +31,9 @@ jobs:
runs-on: ubuntu-latest
needs: [ build ]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Download NuGet Packages Artifact
uses: actions/download-artifact@v4
with:
Expand All @@ -39,8 +43,6 @@ jobs:
- name: Build Changelog
id: build_changelog
uses: mikepenz/release-changelog-builder-action@v4
#env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Release
uses: mikepenz/action-gh-release@v1 #softprops/action-gh-release
Expand Down Expand Up @@ -73,5 +75,5 @@ jobs:
- name: Publish NuGet Packages
run: |
foreach($file in (Get-ChildItem "${{ env.NuGetDirectory }}" -Recurse -Include *.nupkg)) {
dotnet nuget push $file --api-key "${{ secrets.NUGET_APIKEY }}" --source https://nuget.pkg.github.com/MonkeyModdingTroop/index.json --skip-duplicate
dotnet nuget push $file --api-key "${{ secrets.GITHUB_TOKEN }}" --source https://nuget.pkg.github.com/MonkeyModdingTroop/index.json --skip-duplicate
}

0 comments on commit a2af391

Please sign in to comment.