mirror of
https://github.com/we-promise/sure.git
synced 2026-04-18 11:34:13 +00:00
Enhance mobile release workflow with dispatch and script
Added workflow_dispatch trigger and updated GitHub Release step to use a script for release notes and asset uploads. Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
This commit is contained in:
55
.github/workflows/mobile-release.yml
vendored
55
.github/workflows/mobile-release.yml
vendored
@@ -4,6 +4,7 @@ on:
|
||||
push:
|
||||
tags:
|
||||
- 'mobile-v*'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
@@ -92,26 +93,40 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Create GitHub Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: ${{ github.ref_name }}
|
||||
name: "${{ steps.version.outputs.version }} (Mobile)"
|
||||
draft: false
|
||||
prerelease: ${{ contains(github.ref_name, 'alpha') || contains(github.ref_name, 'beta') || contains(github.ref_name, 'rc') }}
|
||||
generate_release_notes: false
|
||||
files: |
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
VERSION="${{ steps.version.outputs.version }}"
|
||||
TAG="${{ github.ref_name }}"
|
||||
|
||||
cat > /tmp/release-notes.md <<NOTES
|
||||
## Mobile-Only Release: ${VERSION}
|
||||
|
||||
This is a mobile-only release. It does not include server-side changes.
|
||||
|
||||
### Downloads
|
||||
|
||||
- **Android APK**: Debug build for testing on Android devices
|
||||
- **iOS Build**: Unsigned iOS build (requires code signing for installation)
|
||||
|
||||
> **Note**: These are builds intended for testing purposes. For production use, please build from source with proper signing credentials.
|
||||
NOTES
|
||||
|
||||
# Strip heredoc indentation
|
||||
sed -i 's/^ //' /tmp/release-notes.md
|
||||
|
||||
PRERELEASE_FLAG=""
|
||||
if [[ "$TAG" == *"alpha"* ]] || [[ "$TAG" == *"beta"* ]] || [[ "$TAG" == *"rc"* ]]; then
|
||||
PRERELEASE_FLAG="--prerelease"
|
||||
fi
|
||||
|
||||
gh release create "$TAG" \
|
||||
--repo "${{ github.repository }}" \
|
||||
--title "${VERSION} (Mobile)" \
|
||||
--notes-file /tmp/release-notes.md \
|
||||
$PRERELEASE_FLAG \
|
||||
${{ runner.temp }}/release-assets/*
|
||||
body: |
|
||||
## Mobile-Only Release: ${{ steps.version.outputs.version }}
|
||||
|
||||
This is a mobile-only release. It does not include server-side changes.
|
||||
|
||||
### Downloads
|
||||
|
||||
- **Android APK**: Debug build for testing on Android devices
|
||||
- **iOS Build**: Unsigned iOS build (requires code signing for installation)
|
||||
|
||||
> **Note**: These are builds intended for testing purposes. For production use, please build from source with proper signing credentials.
|
||||
|
||||
- name: Checkout gh-pages branch
|
||||
uses: actions/checkout@v4
|
||||
@@ -192,4 +207,4 @@ jobs:
|
||||
exit 0
|
||||
fi
|
||||
git commit -m "Update mobile download links for ${{ steps.version.outputs.version }}"
|
||||
git push
|
||||
git push
|
||||
|
||||
Reference in New Issue
Block a user