Fix tag check
Some checks failed
Android Release / release (push) Failing after 23s

This commit is contained in:
2026-01-18 01:05:17 +03:00
parent c785569077
commit 1c7441c76b

View File

@@ -28,28 +28,18 @@ jobs:
echo $VERSION > version.txt echo $VERSION > version.txt
echo "Detected version: $VERSION" echo "Detected version: $VERSION"
- name: Check if tag exists - name: Stop if version already released
id: stop
run: | run: |
VERSION=$(cat version.txt) VERSION=$(cat version.txt)
if git show-ref --tags --quiet --verify "refs/tags/$VERSION"; then if git show-ref --tags --quiet --verify "refs/tags/$VERSION"; then
echo "Tag '$VERSION' already exists." echo "Version $VERSION already released, stopping job."
echo true > tag_exists.txt echo "continue=false" >> $GITHUB_OUTPUT
else else
echo "Tag '$VERSION' does not exist yet." echo "Version $VERSION not released yet, continuing workflow..."
echo false > tag_exists.txt echo "continue=true" >> $GITHUB_OUTPUT
fi fi
- name: Stop if version already released
run: |
EXISTS=$(cat tag_exists.txt | tr -d '[:space:]')
if [ "$EXISTS" = "true" ]; then
echo "Version already released, skipping workflow."
exit 0
else
echo "Version not released yet, continuing workflow..."
fi
- name: Decode keystore - name: Decode keystore
run: | run: |
mkdir -p app mkdir -p app
@@ -79,6 +69,7 @@ jobs:
echo "PATH=$HOME/Android/sdk/cmdline-tools/latest/bin:$HOME/Android/sdk/platform-tools:$PATH" >> $GITHUB_ENV echo "PATH=$HOME/Android/sdk/cmdline-tools/latest/bin:$HOME/Android/sdk/platform-tools:$PATH" >> $GITHUB_ENV
- name: Build Release APK - name: Build Release APK
if: steps.stop.outputs.continue == 'true'
env: env:
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }} KEY_ALIAS: ${{ secrets.KEY_ALIAS }}