Skip to content

Commit cd88499

Browse files
committed
feat: add auto tagging workflow for version bumping and manifest update
1 parent ba95167 commit cd88499

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: '📌 Auto Tag on Master'
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths-ignore:
8+
- 'README.md'
9+
- 'LICENSE'
10+
- '.gitignore'
11+
- '.github/**'
12+
- '*.md'
13+
- '.vscode/**'
14+
jobs:
15+
auto-tag:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Bump version and tag
23+
id: tag_version
24+
uses: anothrNick/github-tag-action@1.67.0
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
WITH_V: true
28+
DEFAULT_BUMP: patch
29+
30+
- name: Update manifest.json
31+
run: |
32+
new_version=$(echo "${{ steps.tag_version.outputs.new_tag }}" | sed 's/^v//')
33+
jq --arg version "$new_version" '.version = $version' public/base.manifest.json > public/base.manifest.json.tmp && mv public/base.manifest.json.tmp public/base.manifest.json
34+
git config --global user.name 'Hackertab CI bot'
35+
git config --global user.email '2389584+medyo@users.noreply.github.com'
36+
git commit -am "Bump manifest version to $new_version" || echo "No changes"
37+
git push

0 commit comments

Comments
 (0)