This commit is contained in:
1 file changed
+3
-4
@@ -11,9 +11,6 @@ env:
|
||||
jobs:
|
||||
Build:
|
||||
runs-on: [ ubuntu-latest ]
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@@ -42,10 +39,12 @@ jobs:
|
||||
- name: Pack
|
||||
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
|
||||
run: dotnet pack PkmnLib.NET.slnx -c Release --nologo --no-restore --no-build -p:Version=$VERSION -o ./packages
|
||||
# Needs a personal access token with write:package scope: Gitea's automatic Actions token
|
||||
# only ever gets read access to the package registry, so pushing with it returns 401.
|
||||
- name: Publish to Gitea NuGet feed
|
||||
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
|
||||
run: >
|
||||
dotnet nuget push "./packages/*.nupkg"
|
||||
--source "${{ github.server_url }}/api/packages/${{ github.repository_owner }}/nuget/index.json"
|
||||
--api-key "${{ secrets.GITHUB_TOKEN }}"
|
||||
--api-key "${{ secrets.PACKAGES_TOKEN }}"
|
||||
--skip-duplicate
|
||||
Reference in new issue
Block a user