Update version for release | Update logger to be mod-specific #21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |