Main Branch Commit #73
This file contains 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: Main Branch Commit | |
on: | |
push: | |
branches: [ 'main' ] | |
schedule: | |
# At 5:30 am on the 1st and 15th day of the month (every two weeks) | |
- cron: '30 5 1,15 * *' | |
workflow_dispatch: | |
inputs: | |
ios-runner-type: | |
type: choice | |
required: true | |
description: "Runner type" | |
default: "self-hosted" | |
options: | |
- "self-hosted" | |
- "macos-13" | |
env: | |
BUILD_TYPE: 'RELEASE' # Allowed values: 'SNAPSHOT', 'RELEASE', 'RELEASE_CANDIDATE' | |
FLUTTER_VERSION: '3.19.0' | |
XCODE_VERSION: '15.4' | |
JAVA_VERSION: '11' | |
RUBY_VERSION: '3.1' | |
HOST_NAME: ${{ secrets.HOST_NAME }} | |
PRIVATE_REPOSITORY_API_KEY: ${{ secrets.PRIVATE_REPOSITORY_API_KEY }} | |
PRIVATE_DART_REPOSITORY: ${{ secrets.PRIVATE_DART_REPOSITORY }} | |
PRIVATE_NATIVE_IOS_REPOSITORY: ${{ secrets.PRIVATE_NATIVE_IOS_REPOSITORY }} | |
PRIVATE_NATIVE_ANDROID_REPOSITORY: ${{ secrets.PRIVATE_NATIVE_ANDROID_REPOSITORY }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_USERNAME: ${{ secrets.GH_USERNAME }} | |
GITHUB_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} | |
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} | |
FIREBASE_APP_ID_IOS: ${{ secrets.FIREBASE_APP_ID_IOS }} | |
FIREBASE_APP_ID_ANDROID: ${{ secrets.FIREBASE_APP_ID_ANDROID }} | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
MATCH_GIT_AUTHORIZATION: ${{ secrets.MATCH_GIT_AUTHORIZATION }} | |
MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }} | |
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} | |
DEVELOPER_PORTAL_TEAM_ID: ${{ secrets.DEVELOPER_PORTAL_TEAM_ID }} | |
CODE_SIGNING_IDENTITY: ${{ secrets.CODE_SIGNING_IDENTITY }} | |
PROVISIONING_PROFILE_SPECIFIER: ${{ secrets.PROVISIONING_PROFILE_SPECIFIER }} | |
TEMP_KEYCHAIN_NAME: ${{ secrets.TEMP_KEYCHAIN_NAME }} | |
SIGNING_CONFIGS: ${{ secrets.SIGNING_CONFIGS }} | |
KEYSTORE_FILE: ${{ secrets.KEYSTORE_FILE }} | |
CURRENT_BUILD_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
jobs: | |
versioning: | |
name: Fetch Versions | |
runs-on: ubuntu-latest | |
outputs: | |
sdk-version: ${{ steps.get-versions.outputs.sdk-version }} | |
app-version: ${{ steps.get-versions.outputs.app-version }} | |
build-number: ${{ steps.get-versions.outputs.build-number }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Fetch Versions | |
id: get-versions | |
uses: ./.github/actions/get-versions | |
publish-ios: | |
name: Publishing iOS App | |
needs: [versioning] | |
runs-on: ${{ github.event.inputs.ios-runner-type || 'self-hosted' }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Update Configuration | |
uses: ./.github/actions/update-config | |
- name: Setup Flutter | |
uses: ./.github/actions/setup-flutter | |
- name: Increment Build Number | |
uses: ./.github/actions/increment-build-number | |
with: | |
build-number: ${{ needs.versioning.outputs.build-number }} | |
- name: Update Flutter Dependencies | |
uses: ./.github/actions/update-flutter-dependencies | |
- name: Setup iOS Environment | |
uses: ./.github/actions/setup-ios | |
- name: Build And Distribute The iOS Example App | |
uses: maierj/[email protected] | |
with: | |
lane: 'main' | |
subdirectory: 'ios' | |
options: | | |
{ | |
"version": "${{ needs.versioning.outputs.app-version }}", | |
"build_number": "${{ needs.versioning.outputs.build-number }}" | |
} | |
publish-android: | |
name: Publishing Android App | |
needs: [versioning] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Update Configuration | |
uses: ./.github/actions/update-config | |
- name: Setup Flutter | |
uses: ./.github/actions/setup-flutter | |
- name: Increment Build Number | |
uses: ./.github/actions/increment-build-number | |
with: | |
build-number: ${{ needs.versioning.outputs.build-number }} | |
- name: Update Flutter Dependencies | |
uses: ./.github/actions/update-flutter-dependencies | |
- name: Setup Android Environment | |
uses: ./.github/actions/setup-android | |
- name: Build And Distribute The Android Example App | |
uses: maierj/[email protected] | |
with: | |
lane: 'main' | |
subdirectory: 'android' | |
options: | | |
{ | |
"version": "${{ needs.versioning.outputs.app-version }}", | |
"build_number": "${{ needs.versioning.outputs.build-number }}" | |
} | |
tag: | |
name: Tagging | |
needs: [versioning, publish-ios, publish-android] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Project | |
uses: actions/checkout@v3 | |
- name: Create Tag | |
uses: ./.github/actions/create-tag | |
with: | |
build-category: 'release' | |
app-version: ${{ needs.versioning.outputs.app-version }} | |
build-number: ${{ needs.versioning.outputs.build-number }} |