Skip to content

Improvement and fix bug known #1

Improvement and fix bug known

Improvement and fix bug known #1

name: Detect PKG New Version
on:
workflow_dispatch:
push:
branches:
- main
paths:
- package.json
jobs:
tag-create:
if: ${{ github.event_name == 'push' && github.actor != 'github-actions[bot]' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Detect PKG Version and Create tag
shell: bash
run: |
PKG_VERSION="v$(cat package.json | jq -r '.version')"
if ! git tag | grep "${PKG_VERSION}"; then
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git tag -a ${PKG_VERSION} -m ${PKG_VERSION}
git push --follow-tags --no-verify --force
fi