Skip to content

Commit 059c04f

Browse files
committed
2025-11-24 [3]
1 parent 0dd976c commit 059c04f

File tree

3 files changed

+36
-3
lines changed

3 files changed

+36
-3
lines changed

.github/workflows/auto-tag.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: 🔖 Auto Tag on Version Change
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- "package.json"
8+
9+
jobs:
10+
tag:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
token: ${{ secrets.GITHUB_TOKEN }}
17+
18+
- name: Read version
19+
id: version
20+
run: |
21+
VERSION=$(node -p "require('./package.json').version")
22+
echo "version=$VERSION" >> $GITHUB_OUTPUT
23+
24+
- name: Check if tag exists
25+
run: |
26+
if git rev-parse "v${{ steps.version.outputs.version }}" >/dev/null 2>&1; then
27+
echo "Tag already exists, skipping."
28+
exit 0
29+
fi
30+
31+
- name: Create tag
32+
run: |
33+
git tag "v${{ steps.version.outputs.version }}"
34+
git push origin "v${{ steps.version.outputs.version }}"

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ jobs:
2626
run: npm ci
2727

2828
- name: Auto bump version
29-
if: "! contains(github.event.head_commit.message, '[skip publish]')"
29+
if: ${{ ! contains(github.event.head_commit.message, '[skip publish]') }}
3030
run: |
3131
npm version patch --no-git-tag-version
3232
git add package.json
3333
git commit -m "ci: auto bump patch version [skip ci]" || echo "No version bump needed"
3434
git push || echo "No changes to push"
3535
3636
- name: Publish to npm
37-
if: "! contains(github.event.head_commit.message, '[skip publish]')"
37+
if: ${{ ! contains(github.event.head_commit.message, '[skip publish]') }}
3838
env:
3939
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4040
run: |

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"coderooz"
2525
],
2626
"main": "index",
27-
"type": "module",
2827
"files": [
2928
"App.tsx",
3029
"index.ts",

0 commit comments

Comments
 (0)