Files
ISODroid/.gitea/workflows/auto-tag.yml
Shihaam Abdul Rahman 659c79e5dd
All checks were successful
Auto Tag on Version Change / check-version (push) Successful in 4s
workflows
2026-03-28 22:35:14 +05:00

31 lines
770 B
YAML

name: Auto Tag on Version Change
on:
push:
branches:
- main
jobs:
check-version:
runs-on: docker-compose
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.PAT_GITEA }}
- name: Create tag if version changed
run: |
VERSION=$(grep 'versionName = ' app/build.gradle.kts | sed 's/.*versionName = "\(.*\)".*/\1/')
echo "Current version: $VERSION"
if git tag -l | grep -q "^v${VERSION}$"; then
echo "Tag v${VERSION} already exists, skipping"
else
git tag "v${VERSION}"
git push origin "v${VERSION}"
echo "Created and pushed tag v${VERSION}"
fi