Merge pull request #60 from nevissecurity/feature/NEVISACCESSAPP-6304… #27
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: Develop Branch Commit | |
on: | |
push: | |
branches: [ 'develop' ] | |
workflow_dispatch: | |
inputs: | |
ios-runner-type: | |
type: choice | |
required: true | |
description: "Runner type" | |
default: "self-hosted" | |
options: | |
- "self-hosted" | |
- "macos-13" | |
env: | |
BUILD_TYPE: 'SNAPSHOT' # Allowed values: 'SNAPSHOT', 'RELEASE', 'RELEASE_CANDIDATE' | |
FLUTTER_VERSION: '3.19.0' | |
XCODE_VERSION: '15.4' | |
JAVA_VERSION: '17' | |
RUBY_VERSION: '3.1' | |
HOST_NAME: ${{ secrets.HOST_NAME }} | |
PRIVATE_REPOSITORY_API_KEY: ${{ secrets.PRIVATE_REPOSITORY_API_KEY }} | |
PRIVATE_DART_REPOSITORY_URL: ${{ secrets.PRIVATE_DART_REPOSITORY_URL }} | |
PRIVATE_NATIVE_IOS_REPOSITORY_URL: ${{ secrets.PRIVATE_NATIVE_IOS_REPOSITORY_URL }} | |
PRIVATE_NATIVE_IOS_REPOSITORY_NAME: ${{ secrets.PRIVATE_NATIVE_IOS_REPOSITORY_NAME }} | |
PRIVATE_NATIVE_ANDROID_REPOSITORY_URL: ${{ secrets.PRIVATE_NATIVE_ANDROID_REPOSITORY_URL }} | |
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 | |
with: | |
sdk-version: ${{ needs.versioning.outputs.sdk-version }} | |
- name: Setup iOS Environment | |
uses: ./.github/actions/setup-ios | |
- name: Build And Distribute The iOS Example App | |
env: | |
PRIVATE_NATIVE_REPOSITORY_URL: ${{ env.PRIVATE_NATIVE_IOS_REPOSITORY_URL }} | |
uses: maierj/[email protected] | |
with: | |
lane: 'develop' | |
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 | |
with: | |
sdk-version: ${{ needs.versioning.outputs.sdk-version }} | |
- name: Setup Android Environment | |
uses: ./.github/actions/setup-android | |
- name: Build And Distribute The Android Example App | |
env: | |
PRIVATE_NATIVE_REPOSITORY_URL: ${{ env.PRIVATE_NATIVE_ANDROID_REPOSITORY_URL }} | |
uses: maierj/[email protected] | |
with: | |
lane: 'develop' | |
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@v4 | |
- name: Create Tag | |
uses: ./.github/actions/create-tag | |
with: | |
build-category: 'build' | |
app-version: ${{ needs.versioning.outputs.app-version }} | |
build-number: ${{ needs.versioning.outputs.build-number }} |