feat(trusted publishing): initial commit to add release github action to support OIDC trusted publish [DX-505] #30
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
| name: CI | |
| permissions: | |
| contents: read | |
| issues: write | |
| on: | |
| push: | |
| branches: ['master', 'next'] | |
| pull_request: | |
| branches: ['*'] | |
| jobs: | |
| build: | |
| uses: ./.github/workflows/build.yaml | |
| check: | |
| needs: build | |
| uses: ./.github/workflows/check.yaml | |
| release: | |
| # TODO: remove 'testing-oidc-trusted-publishing' branch once trusted publishing is stable | |
| if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/testing-oidc-trusted-publishing' || github.ref == 'refs/heads/next') | |
| needs: [build, check] | |
| permissions: | |
| contents: write | |
| id-token: write | |
| actions: read | |
| uses: ./.github/workflows/release.yaml | |
| notify-failure: | |
| # TODO remove 'testing-oidc-trusted-publishing' github issue reporting is stable | |
| if: always() && (needs.build.result == 'failure' || needs.check.result == 'failure' || needs.release.result == 'failure') && (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/testing-oidc-trusted-publishing')) | |
| needs: [build, check, release] | |
| permissions: | |
| contents: read | |
| issues: write | |
| uses: ./.github/workflows/failure-notification.yaml | |
| with: | |
| workflow_name: "Main CI Pipeline" | |
| job_name: ${{ needs.build.result == 'failure' && 'build' || needs.check.result == 'failure' && 'check' || needs.release.result == 'failure' && 'release' || 'unknown' }} | |
| failure_reason: "One or more jobs in the main CI pipeline failed. Check the workflow run for detailed error information." |