Skip to content

fix(lock): empty section means no file for all three lock files (5.2.3) #47

fix(lock): empty section means no file for all three lock files (5.2.3)

fix(lock): empty section means no file for all three lock files (5.2.3) #47

Workflow file for this run

name: Tag Release
on:
push:
branches: [main]
paths:
- 'source/cli/package.json'
jobs:
tag:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Get version from package.json
id: version
run: |
VERSION=$(jq -r '.version' source/cli/package.json)
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Package version: $VERSION"
- name: Check if tag exists
id: tag-check
run: |
if git rev-parse "v${{ steps.version.outputs.version }}" >/dev/null 2>&1; then
echo "exists=true" >> $GITHUB_OUTPUT
echo "Tag v${{ steps.version.outputs.version }} already exists, skipping"
else
echo "exists=false" >> $GITHUB_OUTPUT
echo "Tag v${{ steps.version.outputs.version }} does not exist, will create"
fi
- name: Create and push tag
if: steps.tag-check.outputs.exists == 'false'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git tag -a "v${{ steps.version.outputs.version }}" -m "Release v${{ steps.version.outputs.version }}"
git push origin "v${{ steps.version.outputs.version }}"