Skip to content

Trigger release

Trigger release #18

Workflow file for this run

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
})