Skip to content

chore(local): bump version to 1.2.1 (#215) #70

chore(local): bump version to 1.2.1 (#215)

chore(local): bump version to 1.2.1 (#215) #70

Workflow file for this run

name: Tagger
on:
push:
branches:
- main
jobs:
tagger:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Check current version
id: check_version
run: echo "TAG=v$(node -p "require('./packages/core/package.json').version")" >> $GITHUB_OUTPUT
- name: Check if tag exists
id: check_tag
run: |
git fetch --tags
if [ -z "$(git tag -l | grep -w "^${{ steps.check_version.outputs.TAG }}\$")" ]; then
echo "TAG_EXISTS=false" >> $GITHUB_OUTPUT
else
echo "TAG_EXISTS=true" >> $GITHUB_OUTPUT
fi
- name: Push tag
if: ${{ github.ref == 'refs/heads/master' && steps.check_tag.outputs.TAG_EXISTS == 'false' }}
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git tag ${{ steps.check_version.outputs.TAG }}
git push origin ${{ steps.check_version.outputs.TAG }}