Use API key for publishing to GitHub package repository (#1389) #145
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: Build | |
| # Workflow Trigger | |
| on: | |
| # Trigger the workflow on pushes to the master or develop branch, ignoring changes to /docs | |
| push: | |
| branches: | |
| - develop | |
| - master | |
| paths-ignore: | |
| - 'docs/**' | |
| jobs: | |
| Test: | |
| name: Build | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Get the sources | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Fetch all tags and branches | |
| run: git fetch --prune --unshallow | |
| - name: Install .NET | |
| uses: actions/setup-dotnet@2016bd2012dba4e32de620c46fe006a3ac9f0602 # v5.0.1 | |
| with: | |
| # .NET 5 required for GitVersion | |
| # .NET 7 required for Cake.Recipe | |
| dotnet-version: | | |
| 5.x | |
| 7.x | |
| 8.x | |
| 9.x | |
| 10.x | |
| # Ubuntu 24.04 does not have Mono installed, which is required for Cake.Recipe | |
| - name: Install Mono | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y mono-complete | |
| - name: Build | |
| run: ./build.sh --target=CI --verbosity=diagnostic | |
| shell: bash | |
| env: | |
| AZURE_PASSWORD: ${{ secrets.AZURE_PASSWORD }} | |
| AZURE_SOURCE: ${{ secrets.AZURE_SOURCE }} | |
| AZURE_USER: ${{ secrets.AZURE_USER }} | |
| CODECOV_REPO_TOKEN: ${{ secrets.CODECOV_REPO_TOKEN }} | |
| GITHUB_PAT: ${{ secrets.GH_TOKEN }} | |
| GPR_SOURCE: ${{ secrets.GPR_SOURCE }} | |
| GPR_API_KEY: ${{ secrets.GH_TOKEN }} | |
| NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} | |
| NUGET_SOURCE: "https://api.nuget.org/v3/index.json" | |
| - name: Upload Issues | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| if-no-files-found: warn | |
| name: Issues | |
| path: | | |
| BuildArtifacts/report.html | |
| BuildArtifacts/**/coverlet/*.xml | |
| - name: Upload Packages | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| if-no-files-found: warn | |
| name: package | |
| path: BuildArtifacts/Packages/**/* |