Skip to content

chore: tag ci (#14)

chore: tag ci (#14) #1

Workflow file for this run

name: Tag on Version Change
on:
push:
branches:
- master
workflow_dispatch:
jobs:
tag:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check Version
id: check_version
run: |
if [[ -f VERSION ]]; then
version=$(cat VERSION)
tags=$(git tag --list)
if [[ ! "$tags" =~ (^|[[:space:]])"$version"($|[[:space:]]) ]]; then
echo "::set-output name=tag::$version"
fi
fi
- name: Create Tag
if: steps.check_version.outputs.tag
run: |
git tag ${{ steps.check_version.outputs.tag }}
git push origin ${{ steps.check_version.outputs.tag }}