Pack the Compiler #319
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: Pack the Compiler | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 0 * * 0' | |
| jobs: | |
| pack: | |
| runs-on: ubuntu-latest | |
| env: | |
| DOTNET_NOLOGO: 1 | |
| DOTNET_CLI_TELEMETRY_OPTOUT: 1 | |
| steps: | |
| - name: Fetch the sources | |
| uses: actions/checkout@v5 | |
| - name: Set up .NET 6.0 SDK | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: '6.0.x' | |
| - name: Pack | |
| shell: pwsh | |
| run: dotnet pack PascalABC.NET.Compiler --output nupkg | |
| - name: Upload the artifact | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: compiler-package | |
| path: nupkg/*.nupkg | |
| - name: Push to NuGet | |
| if: github.event_name == 'workflow_dispatch' | |
| run: dotnet nuget push ./nupkg/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.COMPILER_NUGET_TOKEN }} |