Compare commits

..

3 Commits

Author SHA1 Message Date
arbi 6795d5532c Merge pull request 'Tambah script release.sh untuk tagging versi manual' (#3) from development into main
Auto Tag Version / auto-tag (push) Has been cancelled
Reviewed-on: #3
2026-08-07 12:20:37 +07:00
arbi f110662e7c Merge pull request 'Pisahkan dokumentasi fitur ke docs/FEATURES.md' (#2) from development into main
Auto Tag Version / auto-tag (push) Has been cancelled
Reviewed-on: #2
2026-08-07 12:08:33 +07:00
arbi 4a49632086 Merge pull request 'Tambah dokumentasi lengkap fitur aplikasi dengan screenshot' (#1) from development into main
Reviewed-on: #1
2026-08-07 11:49:25 +07:00
2 changed files with 44 additions and 7 deletions
+44
View File
@@ -0,0 +1,44 @@
name: Auto Tag Version
on:
push:
branches:
- main
jobs:
auto-tag:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Bump patch version and create tag
run: |
git fetch --tags origin
latest_tag=$(git tag --list 'v*' --sort=-v:refname | head -n1)
if [ -z "$latest_tag" ]; then
new_tag="v0.1.0"
else
version="${latest_tag#v}"
major="${version%%.*}"
rest="${version#*.}"
minor="${rest%%.*}"
patch="${rest#*.}"
patch=$((patch + 1))
new_tag="v${major}.${minor}.${patch}"
fi
if git rev-parse "$new_tag" >/dev/null 2>&1; then
echo "Tag $new_tag sudah ada, dilewati."
exit 0
fi
echo "Membuat tag baru: $new_tag"
git config user.name "gitea-actions"
git config user.email "actions@git.untan.id"
git tag -a "$new_tag" -m "Auto release $new_tag"
git push origin "$new_tag"
-7
View File
@@ -51,10 +51,3 @@ git tag -a "$new_tag" -m "$message"
git push origin "$new_tag" git push origin "$new_tag"
echo "Selesai. Tag $new_tag sudah dibuat dan dikirim ke origin." echo "Selesai. Tag $new_tag sudah dibuat dan dikirim ke origin."
repo_url=$(git remote get-url origin | sed -E 's#\.git$##')
if [ -n "$latest_tag" ]; then
echo ""
echo "Lihat file yang berubah di rilis ini:"
echo "$repo_url/compare/$latest_tag...$new_tag"
fi