Workflow file for this run
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
| on: | |
| release: | |
| types: [published] | |
| ##workflow_dispatch: | |
| jobs: | |
| publish: | |
| permissions: | |
| id-token: write # enable GitHub OIDC token issuance for this job | |
| contents: read # required for private repo | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 10.x.x | |
| - name: Pack (release) | |
| run: | | |
| dotnet build -c Release -p:ContinuousIntegrationBuild=true | |
| cd ./directives | |
| dotnet pack -c Release -p:ContinuousIntegrationBuild=true | |
| cd .. | |
| cd ./src | |
| dotnet pack -c Release -p:ContinuousIntegrationBuild=true | |
| cd .. | |
| cd ./cli | |
| dotnet pack -c Release -p:ContinuousIntegrationBuild=true | |
| cd .. | |
| - name: Test (release) | |
| run: | | |
| # '-c Release' for dotnet run | |
| # '-- Release' for ./cli | |
| dotnet run --project ./cli -c Release -- Release --TEST | |
| dotnet run --project ./cli -c Release -- Release -md >> $GITHUB_STEP_SUMMARY | |
| ################################ | |
| # NUGET | |
| - name: Trusted Publishing (id-token permission required) | |
| uses: NuGet/login@v1 | |
| id: login # --> ${{ steps.login.outputs.NUGET_API_KEY }} | |
| with: | |
| user: ${{ secrets.NUGET_LOGIN }} | |
| - name: NuGet Publish | |
| run: | | |
| cd ./directives | |
| dotnet nuget push "bin/Release/*.nupkg" \ | |
| -k ${{ steps.login.outputs.NUGET_API_KEY }} \ | |
| -s https://api.nuget.org/v3/index.json \ | |
| --timeout 60 | |
| cd .. | |
| cd ./src | |
| dotnet nuget push "bin/Release/*.nupkg" \ | |
| -k ${{ steps.login.outputs.NUGET_API_KEY }} \ | |
| -s https://api.nuget.org/v3/index.json \ | |
| --timeout 60 | |
| cd .. | |
| cd ./cli | |
| dotnet nuget push "bin/Release/*.nupkg" \ | |
| -k ${{ steps.login.outputs.NUGET_API_KEY }} \ | |
| -s https://api.nuget.org/v3/index.json \ | |
| --timeout 60 | |
| cd .. |