Skip to content

Create tag

Create tag #7

Workflow file for this run

name: Create tag
on:
workflow_dispatch:
inputs:
releaseTag:
description: 'Release version'
required: true
permissions:
contents: write
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Validate branch name
if: ${{ !startsWith(github.ref, 'refs/heads/release/') }}
run: |
echo "Wrong branch used to create tags"
exit 1
- name: Checkout code
uses: actions/checkout@v3
with:
ref: "main"
token: ${{ secrets.RELEASE_PAT }}
persist-credentials: true
- name: Create new tag
run: |
git tag ${{ inputs.releaseTag }}
git push origin --tag