improve automated MapLibre Android release (#3497)
This commit is contained in:
23
.github/workflows/android-release.yml
vendored
23
.github/workflows/android-release.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user