Publish Beta #31
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: Publish Beta | |
on: | |
workflow_dispatch: | |
inputs: | |
upload: | |
description: Upload the build to TestFlight | |
type: boolean | |
default: false | |
required: true | |
changelog: | |
description: Changelog for TestFlight | |
type: string | |
notify_testers: | |
description: Notify TestFlight testers | |
type: boolean | |
default: true | |
required: true | |
jobs: | |
publish: | |
name: Publish | |
runs-on: macos-14 | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Set up Node.js | |
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 | |
with: | |
node-version: 20 | |
check-latest: true | |
cache: npm | |
- name: Install Node.js dependencies | |
run: | | |
npm ci --no-audit | |
git apply patches/boost1760.patch | |
- name: Install Pods | |
run: | | |
cd ios && pod install | |
- name: Setup signing environment | |
env: | |
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} | |
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64_EXPO }} | |
KEYCHAIN_PASSWORD: "CI_PASSWORD" | |
P12_PASSWORD: ${{ secrets.P12_PASSWORD }} | |
run: | | |
# create variables | |
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 | |
PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision | |
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db | |
# import certificate and provisioning profile from secrets | |
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH | |
echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode -o $PP_PATH | |
# create temporary keychain | |
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH | |
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH | |
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH | |
# import certificate to keychain | |
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH | |
security set-key-partition-list -S apple-tool:,apple: -k "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH | |
security list-keychain -d user -s $KEYCHAIN_PATH | |
# apply provisioning profile | |
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles | |
sudo mkdir -p /Library/MobileDevice/Provisioning\ Profiles | |
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles | |
sudo cp $PP_PATH /Library/MobileDevice/Provisioning\ Profiles | |
- name: Decode signing profile secrets | |
run: | | |
echo "FL_CODE_SIGN_IDENTITY=$(echo ${{ secrets.CODE_SIGN_64 }} | base64 --decode)" >> $GITHUB_ENV | |
echo "FL_PROVISIONING_PROFILE_SPECIFIER=$(echo ${{ secrets.PROFILE_NAME_64_EXPO }} | base64 --decode)" >> $GITHUB_ENV | |
- name: Build and publish beta | |
env: | |
APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_KEY_ID_EXPO }} | |
APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_ISSUER_ID }} | |
APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_KEY_CONTENTS_EXPO }} | |
PILOT_CHANGELOG: ${{ github.event.inputs.changelog }} | |
PILOT_NOTIFY_EXTERNAL_TESTERS: ${{ github.event.inputs.notify_testers }} | |
run: fastlane beta upload:${{ github.event.inputs.upload }} |