name: Push on: push: # Only ever run `push` events against protected branches, likely just `main` branches: - main - release-please--branches--main concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: lint: name: Lint uses: ./.github/workflows/reusable-lint.yml permissions: contents: read test: name: Run tests uses: ./.github/workflows/reusable-test.yml permissions: contents: read release: runs-on: ubuntu-latest # Only run Release Please on `main`. It pushes to # `release-please--branches--main` using a GitHub App token, and App token # pushes (unlike `GITHUB_TOKEN`) re-trigger workflows — so running this job # on that branch makes it force-push and re-trigger itself in an infinite # loop. The `test` job still runs on the release branch. if: github.ref == 'refs/heads/main' # Release Please is very fast, so we set a tiny timeout timeout-minutes: 2 # The GitHub App token handles write permissions for contents and # pull-requests, so this job only needs minimal GITHUB_TOKEN permissions. permissions: contents: read steps: # Environment security - name: Harden Runner uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1 with: disable-sudo-and-containers: true egress-policy: audit - name: Generate GitHub App Token uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 id: app-token with: app-id: ${{ secrets.RELEASE_PLEASE_APP_ID }} private-key: ${{ secrets.RELEASE_PLEASE_APP_PRIVATE_KEY }} - name: Release Please uses: googleapis/release-please-action@5c625bfb5d1ff62eadeeb3772007f7f66fdcf071 # v4.4.1 with: token: ${{ steps.app-token.outputs.token }} config-file: .github/release-please-config.json manifest-file: .github/.release-please-manifest.json