-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(deploy): modulize android and ios deployment files
Signed-off-by: Manuel Ruck <git@manuelruck.de>
- Loading branch information
Manuel Ruck
committed
Feb 9, 2025
1 parent
fca8a3a
commit 91ded6b
Showing
4 changed files
with
160 additions
and
83 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Android Deploy Steps | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
app_variant: | ||
type: string | ||
required: true | ||
ci: | ||
type: boolean | ||
required: true | ||
|
||
jobs: | ||
setup: | ||
uses: ./.github/workflows/common-setup.yaml | ||
with: | ||
os: ubuntu-latest | ||
|
||
android-deploy: | ||
needs: setup | ||
runs-on: ubuntu-latest | ||
env: | ||
APP_VARIANT: ${{ inputs.app_variant }} | ||
CI: ${{ inputs.ci }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Restore Yarn dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Decrypt GPG secure files | ||
run: | | ||
sudo apt-get install -y gnupg1 | ||
echo ${{ secrets.SUPER_SECRET_PASSWORD }} | gpg1 --no-tty --passphrase-fd 0 google-services.json.gpg | ||
echo ${{ secrets.SUPER_SECRET_PASSWORD }} | gpg1 --no-tty --passphrase-fd 0 deploy/android/key.json.gpg | ||
echo ${{ secrets.SUPER_SECRET_PASSWORD }} | gpg1 --no-tty --passphrase-fd 0 deploy/android/democracy2-release-key.keystore.gpg | ||
- name: Build Expo app prebuild | ||
run: yarn expo prebuild | ||
|
||
- name: Setup Ruby + Cache Gems | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler-cache: true | ||
working-directory: deploy/android | ||
|
||
- name: Android Fastlane | ||
run: bundle exec fastlane android internal --env internal | ||
working-directory: ./deploy/android | ||
env: | ||
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }} | ||
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }} | ||
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} | ||
ANDROID_PASS: ${{ secrets.ANDROID_PASS }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Common Setup Steps | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
os: | ||
required: true | ||
type: string | ||
description: "The runner OS to use" | ||
|
||
jobs: | ||
setup: | ||
runs-on: ${{ inputs.os }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "22" | ||
|
||
- name: Cache Yarn dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install dependencies | ||
run: yarn |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: iOS Deploy Steps | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
app_variant: | ||
type: string | ||
required: true | ||
ci: | ||
type: boolean | ||
required: true | ||
|
||
jobs: | ||
setup: | ||
uses: ./.github/workflows/common-setup.yaml | ||
with: | ||
os: macos-latest | ||
|
||
ios-deploy: | ||
needs: setup | ||
runs-on: macos-latest | ||
env: | ||
APP_VARIANT: ${{ inputs.app_variant }} | ||
CI: ${{ inputs.ci }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Restore Yarn dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Decrypt GPG secure files | ||
run: | | ||
brew install gnupg@1.4 | ||
echo ${{ secrets.SUPER_SECRET_PASSWORD }} | gpg1 --no-tty --passphrase-fd 0 google-services.json.gpg | ||
echo ${{ secrets.SUPER_SECRET_PASSWORD }} | gpg1 --no-tty --passphrase-fd 0 deploy/ios/AuthKey_3Q9U495BMY.p8.gpg | ||
- name: Build Expo app prebuild | ||
run: yarn expo prebuild | ||
|
||
- name: iOS Fastlane | ||
run: fastlane ios deploy | ||
working-directory: ./deploy/ios | ||
env: | ||
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }} | ||
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }} | ||
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} | ||
MATCH_TYPE: appstore | ||
MATCH_FORCE: "true" | ||
FASTLANE_TEAM_ID: A4B84UJD7M |