Skip to content

fsm-release

fsm-release #12

Workflow file for this run

name: Repository Dispatch - Create Tag
on:
repository_dispatch:
types: [fsm-release]
jobs:
create-tag:
runs-on: ubuntu-latest
steps:
- name: Create tag
uses: actions/github-script@v7
with:
github-token: ${{ secrets.REPOSITORY_DISPATCH_PAT }}
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/${{ github.event.client_payload.version }}',
sha: context.sha
}).catch(err => {
if (err.status !== 422) throw err;
github.rest.git.updateRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'tags/${{ github.event.client_payload.version }}',
sha: context.sha,
force: true
});
})