Publish iOS and Android release #24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish iOS and Android release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version_number: | |
| description: 'Release Version Number' | |
| required: true | |
| type: string | |
| env: | |
| FLUTTER_CHANNEL: "stable" | |
| RUBY_VERSION: "3.2.2" | |
| jobs: | |
| # build_ios: | |
| # name: Build iOS | |
| # runs-on: macos-latest | |
| # timeout-minutes: 20 | |
| # steps: | |
| # - name: Checkout | |
| # uses: actions/checkout@v4 | |
| # | |
| # - name: Set up Ruby | |
| # uses: ruby/setup-ruby@v1 | |
| # with: | |
| # ruby-version: ${{ env.RUBY_VERSION }} | |
| # bundler-cache: true | |
| # working-directory: 'ios' | |
| # | |
| # - name: Run Flutter tasks | |
| # uses: subosito/flutter-action@v2.16.0 | |
| # with: | |
| # flutter-version-file: 'pubspec.yaml' | |
| # channel: ${{ env.FLUTTER_CHANNEL }} | |
| # cache: true | |
| # | |
| # - uses: maierj/fastlane-action@v3.1.0 | |
| # with: | |
| # lane: 'release_app_store' | |
| # subdirectory: ios | |
| # options: '{ "version_number": "${{ github.ref_name }}" }' | |
| # env: | |
| # ASC_KEY_ID: ${{ secrets.ASC_KEY_ID }} | |
| # ASC_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }} | |
| # ASC_KEY_P8_BASE64: ${{ secrets.ASC_KEY_P8_BASE64 }} | |
| # MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} | |
| # MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }} | |
| # APP_BUNDLE_ID: ${{ secrets.APP_BUNDLE_ID }} | |
| build_android: | |
| name: Build Android | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 25 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ env.RUBY_VERSION }} | |
| bundler-cache: true | |
| working-directory: 'android' | |
| - name: Run Flutter tasks | |
| uses: subosito/flutter-action@v2.16.0 | |
| with: | |
| flutter-version-file: 'pubspec.yaml' | |
| channel: ${{ env.FLUTTER_CHANNEL }} | |
| cache: true | |
| - name: Create google_service_account.json | |
| run: | | |
| echo "${{ secrets.FIREBASE_SERVICE_ACCOUNT_BASE64 }}" | base64 --decode > google_service_account.json | |
| - name: Create key.jks | |
| run: | | |
| echo "${{ secrets.ANDROID_KEYSTORE_FILE_BASE64 }}" | base64 --decode > android/key.jks | |
| - name: Create key.properties | |
| run: | | |
| cat <<EOF > android/key.properties | |
| storePassword=${{ secrets.ANDROID_KEY_STORE_PASSWORD }} | |
| keyPassword=${{ secrets.ANDROID_KEY_STORE_PASSWORD }} | |
| keyAlias=release | |
| storeFile=../key.jks | |
| EOF | |
| env: | |
| ANDROID_KEY_STORE_PASSWORD: ${{ secrets.ANDROID_KEY_STORE_PASSWORD }} | |
| - name: Release To Play Store | |
| uses: maierj/fastlane-action@v3.1.0 | |
| with: | |
| lane: 'release_play_store' | |
| subdirectory: android | |
| options: '{ "version_number": "${{ inputs.version_number }}" }' | |
| env: | |
| APP_PACKAGE_NAME: ${{ secrets.APP_PACKAGE_NAME }} | |
| - name: Upload artifacts | |
| uses: maierj/fastlane-action@v3.1.0 | |
| with: | |
| lane: 'upload_artifacts' | |
| subdirectory: android | |
| options: '{ "version_number": "${{ inputs.version_number }}" }' | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} |