Skip to content

Update version for release | Update logger to be mod-specific #21

Update version for release | Update logger to be mod-specific

Update version for release | Update logger to be mod-specific #21

name: Publish NuGet Package to NuGet.org
on:
push:
branches: ['release']
release:
types: ['published']
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
- name: Restore NuGet packages
run: dotnet restore
- name: Build and pack NuGet package
run: dotnet pack --configuration Release
- name: Publish NuGet package to NuGet.org
env:
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_AUTH_TOKEN }}
OWNER: jacopo.uggeri@gmail.com
run: |
dotnet nuget remove source nuget.org || true
dotnet nuget add source --username $OWNER --password $NUGET_AUTH_TOKEN --store-password-in-clear-text --name nuget.org "https://api.nuget.org/v3/index.json"
dotnet nuget push bin/Release/*.nupkg --api-key $NUGET_AUTH_TOKEN --source "nuget.org" --skip-duplicate