diff --git a/.github/workflows/mobile-release.yml b/.github/workflows/mobile-release.yml index 54f6a0865..c3f68e9a7 100644 --- a/.github/workflows/mobile-release.yml +++ b/.github/workflows/mobile-release.yml @@ -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 < **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 \ No newline at end of file + git push