add: permission primitives #45
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: CI | |
| on: | |
| push: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| env: | |
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
| DOTNET_CLI_TELEMETRY_OPTOUT: true | |
| DOTNET_VERSION: 9.0.101 | |
| NUGET_API_KEY: ${{ secrets.NUGET_KEY }} | |
| # Kill other jobs when we trigger this workflow by sending new commits | |
| # to the PR. | |
| # https://stackoverflow.com/a/72408109 | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| # workaround for https://github.com/actions/runner/issues/2033 | |
| - name: ownership workaround | |
| run: git config --global --add safe.directory '*' | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Run ci script quickly | |
| run: dotnet run publish --nuget-api-key ${{ env.NUGET_API_KEY }} --parallel | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |