Publish Beta #7
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: | |
jobs: | |
publish: | |
name: Publish | |
runs-on: macos-14 | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- 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: Build and publish beta | |
run: fastlane beta \ | |
keyID:"${{ secrets.APP_STORE_KEY_ID_EXPO }}" \ | |
issuerID:"${{ secrets.APP_STORE_ISSUER_ID }}" \ | |
keyContents:"${{ secrets.APP_STORE_KEY_CONTENTS_EXPO }}" \ | |
codeSign64:"${{ secrets.CODE_SIGN_64 }}" \ | |
profileName64:"${{ secrets.PROFILE_NAME_64_EXPO }}" |