This commit is contained in:
1 file changed
+3
-4
@@ -11,9 +11,6 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
Build:
|
Build:
|
||||||
runs-on: [ ubuntu-latest ]
|
runs-on: [ ubuntu-latest ]
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
packages: write
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -42,10 +39,12 @@ jobs:
|
|||||||
- name: Pack
|
- name: Pack
|
||||||
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
|
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
|
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
|
- name: Publish to Gitea NuGet feed
|
||||||
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
|
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
|
||||||
run: >
|
run: >
|
||||||
dotnet nuget push "./packages/*.nupkg"
|
dotnet nuget push "./packages/*.nupkg"
|
||||||
--source "${{ github.server_url }}/api/packages/${{ github.repository_owner }}/nuget/index.json"
|
--source "${{ github.server_url }}/api/packages/${{ github.repository_owner }}/nuget/index.json"
|
||||||
--api-key "${{ secrets.GITHUB_TOKEN }}"
|
--api-key "${{ secrets.PACKAGES_TOKEN }}"
|
||||||
--skip-duplicate
|
--skip-duplicate
|
||||||
Reference in new issue
Block a user