Skip to content

armgit / sure

Public Imported from GitHub
0

The personal finance app for everyone (by everyone)

Ruby

Enhance mobile release workflow with dispatch and script

Juan José Mata41bc05a7ac55
diff --git a/.github/workflows/mobile-release.yml b/.github/workflows/mobile-release.yml
index 54f6a0865d..c3f68e9a7d 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: |
- ${{ runner.temp }}/release-assets/*
- body: |
- ## Mobile-Only Release: ${{ steps.version.outputs.version }}
+ 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.
+ This is a mobile-only release. It does not include server-side changes.
- ### Downloads
+ ### Downloads
- - **Android APK**: Debug build for testing on Android devices
- - **iOS Build**: Unsigned iOS build (requires code signing for installation)
+ - **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.
+ > **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/*
- 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