improve automated MapLibre Android release (#3497)

This commit is contained in:
Bart Louwers
2025-06-02 01:40:30 +02:00
committed by GitHub
parent 317c971114
commit 77c0031f31
4 changed files with 95 additions and 41 deletions

View File

@@ -37,7 +37,8 @@ jobs:
run: make run-android-nitpick
- name: Validate and set version
run: ../../.github/scripts/validate-version.sh
working-directory: .
run: .github/scripts/validate-version.sh platform/android/VERSION
- name: Build package
run: |
@@ -69,24 +70,8 @@ jobs:
fi
- name: Create tag if it does not exist
run: |
git config user.name "MapLibre Team"
git config user.email "team@maplibre.org"
tag="android-v${{ env.version }}"
if git rev-parse "$tag" >/dev/null 2>&1; then
tag_sha=$(git rev-parse "$tag^{commit}")
if [ "$tag_sha" = "${{ github.sha }}" ]; then
echo "✅ Tag $tag exists and matches current commit SHA."
exit 0
else
echo "::error::❌ Tag $tag exists but points to a different commit. Aborting."
exit 1
fi
else
git tag -a "$tag" -m "Publish $tag" ${{ github.sha }}
git push origin "$tag"
fi
working-directory: .
run: .github/scripts/ensure-tag.sh android-v${{ env.version }} ${{ github.sha }}
- name: Create release
id: create_release