Skip to content

REL: 0.0.1

REL: 0.0.1 #5

Workflow file for this run

name: Add a git tag for the release
on:
push:
branches:
- main
jobs:
main:
name: tag the commit
runs-on: ubuntu-latest
if: "startsWith(${{ github.event.head_commit.message}}, 'REL: ')"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Extract version from commit message
id: extract_version
run: |
VERSION=$(echo "${{ github.event.head_commit.message }}" | grep -oP '(?<=REL: )\d+\.\d+\.\d+')
echo "::set-output name=version::$VERSION"
- name: Create Git Tag
run: |
VERSION="${{ steps.extract_version.outputs.version }}"
git config --global user.email "action@github.com"
git config --global user.name "Github Action"
git tag "$VERSION" -m "${{ github.event.head_commit.message }}"
git push --tags