Create release branch #6
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
| # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | |
| name: Create release branch | |
| on: | |
| issues: | |
| types: [labeled] | |
| permissions: | |
| contents: read | |
| issues: write | |
| jobs: | |
| branch: | |
| name: Create maintenance branch | |
| if: github.event.label.name == 'release:branch' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| ISSUE_BODY: ${{ github.event.issue.body }} | |
| ISSUE_NUMBER: ${{ github.event.issue.number }} | |
| RELEASE_ACTOR: ${{ github.event.sender.login }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| persist-credentials: false | |
| - name: Authorize release actor | |
| run: bash -c 'source .github/scripts/release-common.sh; require_maintainer' | |
| - name: Create release app token | |
| id: release-app-token | |
| uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4 | |
| with: | |
| app-id: ${{ secrets.RELEASE_APP_ID }} | |
| private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }} | |
| owner: ${{ github.repository_owner }} | |
| repositories: ${{ github.event.repository.name }} | |
| permission-contents: write | |
| - name: Create branch | |
| env: | |
| PUSH_TOKEN: ${{ steps.release-app-token.outputs.token }} | |
| run: | | |
| set -o pipefail | |
| bash .github/scripts/create-release-branch.sh 2>&1 | tee "${RUNNER_TEMP}/release-branch.log" | |
| - name: Comment on failure | |
| if: failure() | |
| env: | |
| PUSH_TOKEN: ${{ steps.release-app-token.outputs.token }} | |
| run: bash .github/scripts/comment-issue-failure.sh "${RUNNER_TEMP}/release-branch.log" "Create release branch" |