trigger-release #1
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: trigger-release | |
| # Manually-triggered release: create an empty commit and a tag for the | |
| # given version, then push both. Pushing the tag with the GitHub App token (not | |
| # the default GITHUB_TOKEN) is what lets it trigger the `release` workflow. | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: "Version (e.g. v1.2.3)" | |
| required: true | |
| type: string | |
| permissions: | |
| contents: read | |
| jobs: | |
| trigger-release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: token@github-app | |
| id: app-token | |
| uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0 | |
| with: | |
| app-id: ${{ secrets.CIBOT_APPID }} | |
| private-key: ${{ secrets.CIBOT_PRIVKEY }} | |
| - name: checkout@scm | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| token: ${{ steps.app-token.outputs.token }} | |
| - name: release@git | |
| env: | |
| VERSION: ${{ inputs.version }} | |
| run: | | |
| git config user.name "${{ github.actor }}" | |
| git config user.email "${{ github.actor }}@users.noreply.github.com" | |
| git commit --allow-empty -m ":bookmark: ${VERSION}" | |
| git tag "${VERSION}" | |
| git push origin "HEAD:${{ github.ref_name }}" | |
| git push origin "${VERSION}" |