mirror of
https://github.com/openMF/mobile-wallet.git
synced 2026-02-06 09:37:24 +00:00
* Chore: Updated Fastlane and CI for release This commit adds Fastlane for automating the Android release process and configures CI for internal, beta, and production releases using GitHub Actions. The following changes were made: - Added Fastlane configuration files for building, testing, and deploying the app. - Added GitHub Actions workflows for triggering internal, beta, and production releases. - Updated .gitignore to exclude Fastlane report files. - Updated dependency versions in Gemfile.lock. - Added a README for Fastlane. - Updated the make_site workflow to trigger on released releases instead of published releases.
274 lines
8.5 KiB
YAML
274 lines
8.5 KiB
YAML
name: Internal Or Beta Release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
release_type:
|
|
required: false
|
|
default: 'internal'
|
|
description: Please select the release type
|
|
type: choice
|
|
options:
|
|
- internal
|
|
- beta
|
|
|
|
publish_to_play_store:
|
|
required: false
|
|
default: false
|
|
description: Publish to Play Store?
|
|
type: boolean
|
|
|
|
publish_ios:
|
|
required: false
|
|
default: false
|
|
description: Publish to Firebase iOS App Distribution?
|
|
type: boolean
|
|
|
|
env:
|
|
SUPPLY_UPLOAD_MAX_RETRIES: 5
|
|
|
|
jobs:
|
|
build_desktop_and_ios_app:
|
|
strategy:
|
|
matrix:
|
|
os:
|
|
- macos-latest
|
|
- ubuntu-latest
|
|
- windows-latest
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-java@v4
|
|
with:
|
|
distribution: 'zulu'
|
|
java-version: 17
|
|
|
|
- name: Build Desktop App
|
|
env:
|
|
NOTARIZATION_APPLE_ID: ${{ secrets.NOTARIZATION_APPLE_ID }}
|
|
NOTARIZATION_PASSWORD: ${{ secrets.NOTARIZATION_PASSWORD }}
|
|
NOTARIZATION_TEAM_ID: ${{ secrets.NOTARIZATION_TEAM_ID }}
|
|
run: ./gradlew packageReleaseDistributionForCurrentOS
|
|
|
|
- name: Configure Ruby
|
|
if: matrix.os == 'macos-latest'
|
|
uses: ruby/setup-ruby@a2bbe5b1b236842c1cb7dd11e8e3b51e0a616acc # v1.202.0
|
|
with:
|
|
bundler-cache: true
|
|
|
|
- name: Install Fastlane
|
|
if: matrix.os == 'macos-latest'
|
|
run: |
|
|
gem install bundler:2.2.27
|
|
bundle install --jobs 4 --retry 3
|
|
bundle exec fastlane add_plugin firebase_app_distribution
|
|
bundle exec fastlane add_plugin increment_build_number
|
|
|
|
- name: Build iOS App
|
|
if: matrix.os == 'macos-latest'
|
|
continue-on-error: true
|
|
run: bundle exec fastlane ios build_ios
|
|
|
|
distribute_android_app:
|
|
name: Github, Firebase Release
|
|
needs: [ build_desktop_and_ios_app ]
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up JDK 17
|
|
uses: actions/setup-java@v4.2.2
|
|
with:
|
|
distribution: 'temurin'
|
|
java-version: '17'
|
|
|
|
- name: Setup Gradle
|
|
uses: gradle/actions/setup-gradle@v4
|
|
|
|
- uses: ./.github/actions/create-release-number
|
|
name: Create Release Number
|
|
id: rel_number
|
|
|
|
- uses: ./.github/actions/inflate-secrets
|
|
name: Inflate Secrets
|
|
with:
|
|
keystore: ${{ secrets.ORIGINAL_KEYSTORE_FILE }}
|
|
google-services: ${{ secrets.GOOGLESERVICES }}
|
|
playstore-creds: ${{ secrets.PLAYSTORECREDS }}
|
|
firebase-creds: ${{ secrets.FIREBASECREDS }}
|
|
|
|
- uses: ./.github/actions/create-release-notes
|
|
name: Create Release Notes
|
|
with:
|
|
tag-name: ${{ steps.rel_number.outputs.version }}
|
|
gh-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Build Release
|
|
env:
|
|
KEYSTORE_PASSWORD: ${{ secrets.ORIGINAL_KEYSTORE_FILE_PASSWORD }}
|
|
KEYSTORE_ALIAS: ${{ secrets.ORIGINAL_KEYSTORE_ALIAS }}
|
|
KEYSTORE_ALIAS_PASSWORD: ${{ secrets.ORIGINAL_KEYSTORE_ALIAS_PASSWORD }}
|
|
VERSION_CODE: ${{ steps.rel_number.outputs.version-code }}
|
|
run: |
|
|
./gradlew :mifospay-android:assembleRelease
|
|
|
|
- name: Archive Build
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
path: ./**/*.apk
|
|
|
|
- name: Create Version File
|
|
if: github.event.inputs.release_type == 'beta'
|
|
shell: bash
|
|
env:
|
|
VERSION_CODE: ${{ steps.rel_number.outputs.version-code }}
|
|
run: |
|
|
echo $VERSION_CODE > ./mifospay-android/build/outputs/version_code.txt
|
|
|
|
- name: Create Github Pre-Release
|
|
if: github.event.inputs.release_type == 'beta'
|
|
uses: softprops/action-gh-release@v2.0.8
|
|
with:
|
|
tag_name: ${{ steps.rel_number.outputs.version }}
|
|
body_path: ./mifospay-android/build/outputs/changelogGithub
|
|
draft: false
|
|
prerelease: true
|
|
files: |
|
|
./mifospay-android/build/outputs/apk/demo/release/mifospay-android-demo-release.apk
|
|
./mifospay-android/build/outputs/apk/prod/release/mifospay-android-prod-release.apk
|
|
./mifospay-android/build/outputs/version_code.txt
|
|
./mifospay-desktop/build/compose/binaries/main-release/exe/*.exe
|
|
./mifospay-desktop/build/compose/binaries/main-release/msi/*.msi
|
|
./mifospay-desktop/build/compose/binaries/main-release/deb/*.deb
|
|
./mifospay-desktop/build/compose/binaries/main-release/dmg/*.dmg
|
|
|
|
|
|
- name: ☁️ Deploy to Firebase
|
|
env:
|
|
KEYSTORE_PASSWORD: ${{ secrets.ORIGINAL_KEYSTORE_FILE_PASSWORD }}
|
|
KEYSTORE_ALIAS: ${{ secrets.ORIGINAL_KEYSTORE_ALIAS }}
|
|
KEYSTORE_ALIAS_PASSWORD: ${{ secrets.ORIGINAL_KEYSTORE_ALIAS_PASSWORD }}
|
|
VERSION_CODE: ${{ steps.rel_number.outputs.version-code }}
|
|
run: ./gradlew appDistributionUploadProdRelease --no-configuration-cache
|
|
|
|
- name: Print `git status`
|
|
run: git status
|
|
|
|
distribute_ios_app:
|
|
name: Build iOS App
|
|
if: ${{ github.event.inputs.release_type == 'beta' && github.event.inputs.publish_ios == true }}
|
|
needs: [ distribute_android_app ]
|
|
runs-on: macos-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up JDK 17
|
|
uses: actions/setup-java@v4.2.2
|
|
with:
|
|
distribution: 'temurin'
|
|
java-version: '17'
|
|
|
|
- name: Setup Gradle
|
|
uses: gradle/actions/setup-gradle@v4
|
|
|
|
- name: Configure Ruby
|
|
uses: ruby/setup-ruby@a2bbe5b1b236842c1cb7dd11e8e3b51e0a616acc # v1.202.0
|
|
with:
|
|
bundler-cache: true
|
|
|
|
- name: Install Fastlane
|
|
run: |
|
|
gem install bundler:2.2.27
|
|
bundle install --jobs 4 --retry 3
|
|
bundle exec fastlane add_plugin firebase_app_distribution
|
|
bundle exec fastlane add_plugin increment_build_number
|
|
|
|
- name: Upload iOS App to Firebase Distribution
|
|
run: bundle exec fastlane ios distribute_ios_app
|
|
|
|
- name: Print `git status`
|
|
run: git status
|
|
|
|
play_publish:
|
|
name: Play Publish
|
|
if: ${{ inputs.publish_to_play_store == true }}
|
|
runs-on: macos-latest
|
|
concurrency:
|
|
group: playstore_deploy
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up JDK 17
|
|
uses: actions/setup-java@v4.2.2
|
|
with:
|
|
distribution: 'temurin'
|
|
java-version: '17'
|
|
|
|
- name: Configure Ruby
|
|
uses: ruby/setup-ruby@a2bbe5b1b236842c1cb7dd11e8e3b51e0a616acc # v1.202.0
|
|
with:
|
|
bundler-cache: true
|
|
|
|
- name: Install Fastlane
|
|
run: |
|
|
gem install bundler:2.2.27
|
|
bundle install --jobs 4 --retry 3
|
|
bundle exec fastlane add_plugin firebase_app_distribution
|
|
bundle exec fastlane add_plugin increment_build_number
|
|
|
|
- name: Setup Gradle
|
|
uses: gradle/actions/setup-gradle@v4
|
|
|
|
- uses: ./.github/actions/create-release-number
|
|
name: Create Release Number
|
|
id: rel_number
|
|
|
|
- uses: ./.github/actions/inflate-secrets
|
|
name: Inflate Secrets
|
|
with:
|
|
keystore: ${{ secrets.UPLOAD_KEYSTORE_FILE }}
|
|
google-services: ${{ secrets.GOOGLESERVICES }}
|
|
playstore-creds: ${{ secrets.PLAYSTORECREDS }}
|
|
firebase-creds: ${{ secrets.FIREBASECREDS }}
|
|
|
|
- uses: ./.github/actions/create-release-notes
|
|
name: Create Release Notes
|
|
with:
|
|
tag-name: ${{ steps.rel_number.outputs.version }}
|
|
gh-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Build Release
|
|
env:
|
|
KEYSTORE_PASSWORD: ${{ secrets.UPLOAD_KEYSTORE_FILE_PASSWORD }}
|
|
KEYSTORE_ALIAS: ${{ secrets.UPLOAD_KEYSTORE_ALIAS }}
|
|
KEYSTORE_ALIAS_PASSWORD: ${{ secrets.UPLOAD_KEYSTORE_ALIAS_PASSWORD }}
|
|
VERSION_CODE: ${{ steps.rel_number.outputs.version-code }}
|
|
run: |
|
|
./gradlew :mifospay-android:bundleRelease
|
|
|
|
- name: Archive Build
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: release-aabs
|
|
path: ./**/*.aab
|
|
|
|
- name: Deploy to Playstore Internal
|
|
run: bundle exec fastlane deploy_internal
|
|
|
|
- name: Promote Internal to Beta
|
|
if: github.event.inputs.release_type == 'beta'
|
|
run: bundle exec fastlane promote_to_beta
|