Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#169] [iOS] Add mirrored workflows at the root project to test the iOS app publishing workflows #265

Merged
merged 24 commits into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
5828298
[#169] Implement upload to testflight and app store flow
doannimble Aug 7, 2023
e541ea4
[#169] Remove unused file
doannimble Aug 14, 2023
6845fba
[#169] Revert name to easy find the changes
doannimble Aug 17, 2023
fa83177
[#169] Update indent
doannimble Aug 17, 2023
2a3709e
[#169] Update indent for app store flow
doannimble Aug 17, 2023
ad4971a
[#169] Update mustacheCase for PRIVATE KEY
doannimble Aug 17, 2023
a745c66
[#169] Update sample indent
doannimble Aug 17, 2023
b26e350
[Chore] Generate & update sample project
bot-nimble Aug 28, 2023
a94a603
[#169] Format Fastfile and update sample env
doannimble Aug 29, 2023
a497ef6
[Chore] Generate & update sample project
bot-nimble Aug 29, 2023
7ddf6cd
[#169] Update name and indent
doannimble Aug 31, 2023
7f0f15f
[Chore] Generate & update sample project
bot-nimble Aug 31, 2023
9c81226
[#169] Update APP_STORE_CONNECT_API_KEY_BASE64 name
doannimble Aug 31, 2023
b79e9cf
[#169] Update GITHUB_RUN_NUMBER
doannimble Aug 31, 2023
c886304
[#169] Format ios deploy files
doannimble Aug 31, 2023
c090c40
[#169] Update echo ENV
doannimble Aug 31, 2023
4e4e688
[#169] Update set_app_store_connect_api_key name
doannimble Aug 31, 2023
f2b8ce4
[#169] Update env name
doannimble Aug 31, 2023
47d9b1e
[Chore] Generate & update sample project
bot-nimble Aug 31, 2023
7e0beee
[#169] Fix missing comments
doannimble Aug 31, 2023
db787be
[Chore] Generate & update sample project
bot-nimble Aug 31, 2023
9309890
[#169] Format spacing
doannimble Sep 6, 2023
2e162e8
[#169] Format code
doannimble Sep 6, 2023
5acbeaa
[Chore] Generate & update sample project
bot-nimble Sep 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/android_deploy_production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
env:
ENV: ${{ secrets.ENV }}
run: |
echo "$ENV" > .env
echo -e "$ENV" > .env

# App Bundle requires Firebase connected to Play Store to upload https://appdistribution.page.link/KPoa
- name: Build Android apk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
env:
ENV: ${{ secrets.ENV }}
run: |
echo "$ENV" > .env
echo -e "$ENV" > .env

- name: Set up release signing configs
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/android_deploy_staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
env:
ENV: ${{ secrets.ENV }}
run: |
echo "$ENV" > .env.staging
echo -e "$ENV" > .env.staging

# App Bundle requires Firebase connected to Play Store to upload https://appdistribution.page.link/KPoa
- name: Build Android apk
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ios_deploy_staging_to_firebase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
env:
ENV: ${{ secrets.ENV }}
run: |
echo "$ENV" > .env.staging
echo -e "$ENV" > .env.staging

- name: Run code generator
run: flutter packages pub run build_runner build --delete-conflicting-outputs
Expand Down
97 changes: 97 additions & 0 deletions .github/workflows/ios_deploy_to_app_store.yml
doannimble marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: ios-deploy-production-to-app-store
on:
# Trigger the workflow on push action
push:
branches:
- main

jobs:
build_and_upload_to_app_store:
name: Build And Upload iOS Application Production To AppStore
runs-on: macOS-latest
environment: production
timeout-minutes: 30
env:
TEAM_ID: ${{ secrets.TEAM_ID }}
FASTLANE_USER: ${{ secrets.FASTLANE_USER }}
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: ${{ secrets.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}
FASTLANE_SESSION: ${{ secrets.FASTLANE_SESSION }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
APP_STORE_KEY_ID: ${{ secrets.APP_STORE_KEY_ID }}
APP_STORE_ISSUER_ID: ${{ secrets.APP_STORE_ISSUER_ID }}
APP_STORE_CONNECT_API_KEY_BASE64: ${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }}
GITHUB_RUN_NUMBER: $GITHUB_RUN_NUMBER
steps:
- name: Check out
uses: actions/checkout@v3

- name: Install SSH key
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}

- name: Set up Flutter environment
uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: '3.10.5'

- name: Generate new project
run: |
dart pub global activate mason_cli
mason get
mason make template -c mason-config.json
# Move the generated project to the root directory for next steps & cleanup to not affect static code analysis
rsync -av --remove-source-files flutter_templates/ ./
rm -rf bricks sample

- name: Get Flutter dependencies
run: flutter pub get

- name: Set up Production env
env:
ENV: ${{ secrets.ENV }}
run: |
echo -e "$ENV" >> .env

- name: Run code generator
run: flutter packages pub run build_runner build --delete-conflicting-outputs

- name: Cache Ruby gems
uses: actions/cache@v3
id: bunlderCache
with:
path: ios/vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: ${{ runner.os }}-gems-

- name: Cache Pods
uses: actions/cache@v3
id: cocoapodCache
with:
path: ios/Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: ${{ runner.os }}-pods-

- name: Bundle install
run: cd ./ios && bundle install

- name: Pod install
run: cd ./ios && pod install

- name: Update fastlane
run: cd ./ios && bundle update fastlane

- name: Update plugins
run: cd ./ios && bundle exec fastlane update_plugins

- name: Match AppStore
run: cd ./ios && bundle exec fastlane sync_appstore_production_signing
env:
GITHUB_RUN_NUMBER: $GITHUB_RUN_NUMBER

- name: Deploy to AppStore
run: |
cd ./ios && bundle exec fastlane build_and_upload_production_app_store_connect_app
97 changes: 97 additions & 0 deletions .github/workflows/ios_deploy_to_testflight.yml
doannimble marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: ios-deploy-production-to-testflight
on:
# Trigger the workflow on push action
push:
branches:
- main

jobs:
build_and_upload_to_testflight:
name: Build And Upload iOS Application Production To TestFlight
runs-on: macOS-latest
environment: production
timeout-minutes: 30
env:
TEAM_ID: ${{ secrets.TEAM_ID }}
FASTLANE_USER: ${{ secrets.FASTLANE_USER }}
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: ${{ secrets.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}
FASTLANE_SESSION: ${{ secrets.FASTLANE_SESSION }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
APP_STORE_KEY_ID: ${{ secrets.APP_STORE_KEY_ID }}
APP_STORE_ISSUER_ID: ${{ secrets.APP_STORE_ISSUER_ID }}
APP_STORE_CONNECT_API_KEY_BASE64: ${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }}
GITHUB_RUN_NUMBER: $GITHUB_RUN_NUMBER
steps:
- name: Check out
uses: actions/checkout@v3

- name: Install SSH key
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}

- name: Set up Flutter environment
uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: '3.10.5'

- name: Generate new project
run: |
dart pub global activate mason_cli
mason get
mason make template -c mason-config.json
# Move the generated project to the root directory for next steps & cleanup to not affect static code analysis
rsync -av --remove-source-files flutter_templates/ ./
rm -rf bricks sample

- name: Get Flutter dependencies
run: flutter pub get

- name: Set up Production env
env:
ENV: ${{ secrets.ENV }}
run: |
echo -e "$ENV" >> .env

- name: Run code generator
run: flutter packages pub run build_runner build --delete-conflicting-outputs

- name: Cache Ruby gems
uses: actions/cache@v3
id: bunlderCache
with:
path: ios/vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: ${{ runner.os }}-gems-

- name: Cache Pods
uses: actions/cache@v3
id: cocoapodCache
with:
path: ios/Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: ${{ runner.os }}-pods-

- name: Bundle install
run: cd ./ios && bundle install

- name: Pod install
run: cd ./ios && pod install

- name: Update fastlane
run: cd ./ios && bundle update fastlane

- name: Update plugins
run: cd ./ios && bundle exec fastlane update_plugins

- name: Match AppStore
run: cd ./ios && bundle exec fastlane sync_appstore_production_signing
env:
GITHUB_RUN_NUMBER: $GITHUB_RUN_NUMBER

- name: Deploy to TestFlight
run: |
cd ./ios && bundle exec fastlane build_and_upload_testflight_production_app
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
env:
ENV: ${{#mustacheCase}}secrets.ENV{{/mustacheCase}}
run: |
echo "$ENV" > .env
echo -e "$ENV" > .env

# App Bundle requires Firebase connected to Play Store to upload https://appdistribution.page.link/KPoa
- name: Build Android apk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
env:
ENV: ${{#mustacheCase}}secrets.ENV{{/mustacheCase}}
run: |
echo "$ENV" > .env
echo -e "$ENV" > .env

- name: Set up release signing configs
env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
env:
ENV: ${{#mustacheCase}}secrets.ENV{{/mustacheCase}}
run: |
echo "$ENV" > .env.staging
echo -e "$ENV" > .env.staging

# App Bundle requires Firebase connected to Play Store to upload https://appdistribution.page.link/KPoa
- name: Build Android apk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
env:
ENV: ${{#mustacheCase}}secrets.ENV{{/mustacheCase}}
run: |
echo "$ENV" > .env.staging
echo -e "$ENV" > .env.staging

- name: Run code generator
run: flutter packages pub run build_runner build --delete-conflicting-outputs
Expand Down
luongvo marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: ios-deploy-to-app-store
name: ios-deploy-production-to-app-store
on:
# Trigger the workflow on push action
push:
branches:
- develop
- main

jobs:
build_and_upload_to_app_store:
name: Build And Upload iOS Application To AppStore
name: Build And Upload iOS Application Production To AppStore
runs-on: macOS-latest
environment: staging
environment: production
timeout-minutes: 30
env:
TEAM_ID: ${{#mustacheCase}}secrets.TEAM_ID{{/mustacheCase}}
Expand All @@ -19,37 +19,70 @@ jobs:
FASTLANE_SESSION: ${{#mustacheCase}}secrets.FASTLANE_SESSION{{/mustacheCase}}
MATCH_PASSWORD: ${{#mustacheCase}}secrets.MATCH_PASSWORD{{/mustacheCase}}
KEYCHAIN_PASSWORD: ${{#mustacheCase}}secrets.KEYCHAIN_PASSWORD{{/mustacheCase}}
GITHUB_RUN_NUMBER: $secrets.GITHUB_RUN_NUMBER
APP_STORE_KEY_ID: ${{#mustacheCase}}secrets.APP_STORE_KEY_ID{{/mustacheCase}}
APP_STORE_ISSUER_ID: ${{#mustacheCase}}secrets.APP_STORE_ISSUER_ID{{/mustacheCase}}
APP_STORE_CONNECT_API_KEY_BASE64: ${{#mustacheCase}}secrets.APP_STORE_CONNECT_API_KEY_BASE64{{/mustacheCase}}
GITHUB_RUN_NUMBER: $GITHUB_RUN_NUMBER
steps:
- name: Check out
uses: actions/checkout@v3
- name: Check out
uses: actions/checkout@v3

- name: Install SSH key
uses: webfactory/ssh-agent@v0.4.1
with:
ssh-private-key: ${{#mustacheCase}}secrets.SSH_PRIVATE_KEY{{/mustacheCase}}
- name: Install SSH key
uses: webfactory/ssh-agent@v0.7.0
with:
ssh-private-key: ${{#mustacheCase}}secrets.SSH_PRIVATE_KEY{{/mustacheCase}}

- name: Set up Flutter environment
uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: '3.10.5'
- name: Set up Flutter environment
uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: '3.10.5'

- name: Get Flutter dependencies
run: flutter pub get
- name: Get Flutter dependencies
run: flutter pub get

- name: Run code generator
run: flutter packages pub run build_runner build --delete-conflicting-outputs
- name: Set up Production env
env:
ENV: ${{#mustacheCase}} secrets.ENV {{/mustacheCase}}
doannimble marked this conversation as resolved.
Show resolved Hide resolved
run: |
echo -e "$ENV" >> .env

- name: Bundle install
run: cd ./ios && bundle install
- name: Run code generator
run: flutter packages pub run build_runner build --delete-conflicting-outputs

- name: Pod install
run: cd ./ios && pod install
- name: Cache Ruby gems
uses: actions/cache@v3
id: bunlderCache
with:
path: ios/vendor/bundle
key: ${{#mustacheCase}} runner.os {{/mustacheCase}}-gems-${{#mustacheCase}} hashFiles('**/Gemfile.lock') {{/mustacheCase}}
restore-keys: ${{#mustacheCase}} runner.os {{/mustacheCase}}-gems-
doannimble marked this conversation as resolved.
Show resolved Hide resolved

- name: Match AppStore
run: cd ./ios && bundle exec fastlane sync_appstore_staging_signing
- name: Cache Pods
uses: actions/cache@v3
id: cocoapodCache
with:
path: ios/Pods
key: ${{#mustacheCase}} runner.os {{/mustacheCase}}-pods-${{#mustacheCase}} hashFiles('**/Podfile.lock') {{/mustacheCase}}
restore-keys: ${{ runner.os }}-pods-
doannimble marked this conversation as resolved.
Show resolved Hide resolved

- name: Deploy to AppStore
run: |
cd ./ios && bundle exec fastlane build_and_upload_app_store_connect_app
- name: Bundle install
run: cd ./ios && bundle install

- name: Pod install
run: cd ./ios && pod install

- name: Update fastlane
run: cd ./ios && bundle update fastlane

- name: Update plugins
run: cd ./ios && bundle exec fastlane update_plugins

- name: Match AppStore
run: cd ./ios && bundle exec fastlane sync_appstore_production_signing
env:
GITHUB_RUN_NUMBER: $GITHUB_RUN_NUMBER

- name: Deploy to AppStore
run: |
cd ./ios && bundle exec fastlane build_and_upload_production_app_store_connect_app
Loading