GitHub action is failing to push the NuGet package to the Org packages

Hi There,

I have a public repository GitHub - icgam/Easify.Extensions.Notifications at Feature/AddNotificationFromCore which uses GitHub actions to publish the generated component to private GitHub packages. The same Action workflow is working in a similar repository with no problem, but this repo is raising error HTTP 403.

I’m using GITHUB_TOKEN to push to the private packages and I can’t figure out what is missing from the process and I would appreciate it if you can help me on this.

Here are the links to the workflow definition and the failing build:

Hi @moattarwork,

Sorry about the delay in getting back to you!

I see the problem was the RepositoryUrl property pointing at the wrong URL.

BTW, you can simplify your workflow further by changing:

      - name: Configure github as Package Repository
        run: dotnet nuget add source https://nuget.pkg.github.com/icgam/index.json -n "github"
      - name: Publish the package to GitHub Packages
        run: dotnet nuget push "**/*.nupkg" -s "github" -k ${{ secrets.GITHUB_TOKEN }} --skip-duplicate

… to simply:

      - name: Publish the package to GitHub Packages
        run: dotnet nuget push "**/*.nupkg" -s https://nuget.pkg.github.com/${{ github.repository_owner }} -k ${{ github.token }} --skip-duplicate