Trigger release #18
This file contains 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 | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
type: string | |
description: Version of the next release (e.g. v1.10.0) | |
required: true | |
permissions: | |
contents: write | |
jobs: | |
trigger-release: | |
name: Trigger release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Create tag | |
uses: actions/github-script@v7 | |
with: | |
# Unfortunately PAT is required to create a tag and in that way trigger other workflow. | |
# Read more here: https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow | |
github-token: ${{ secrets.RELEASE_GH_DEV_ACCOUNT_PAT }} | |
script: | | |
github.rest.git.createRef({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
ref: 'refs/tags/${{ inputs.version }}', | |
sha: context.sha | |
}) |