Skip to content

minor verison bump: 0.1.1-17 #66

minor verison bump: 0.1.1-17

minor verison bump: 0.1.1-17 #66

Workflow file for this run

# SPDX-FileCopyrightText: 2023 Simon Dalvai <[email protected]>
# SPDX-License-Identifier: CC0-1.0
name: iOS upload
on:
push:
paths:
- "version"
- ".github/workflows/upload-ios.yml"
- "exportOptions.plist"
- "export_presets.ios.example"
env:
GODOT_VERSION: 4.2.1
PROJECT_NAME: FutsalManager
WORKING_DIRECTORY: game
IOS_APPSTORE_TEAM_ID: ${{ secrets.IOS_APPSTORE_TEAM_ID }}
IOS_APPLE_ID_USERNAME: ${{ secrets.IOS_APPLE_ID_USERNAME }}
IOS_APPLE_ID_PASSWORD: ${{ secrets.IOS_APPLE_ID_PASSWORD }}
BUILD_CERTIFICATE_BASE64: ${{ secrets.IOS_BUILD_CERTIFICATE_BASE64 }}
P12_PASSWORD: ${{ secrets.IOS_P12_PASSWORD }}
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.IOS_PROVISION_PROFILE_BASE64 }}
KEYCHAIN_PASSWORD: ${{ secrets.IOS_KEYCHAIN_PASSWORD }}
jobs:
deploy:
if: github.ref == 'refs/heads/prod'
runs-on: macos-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
# https://docs.github.com/en/actions/deployment/deploying-xcode-applications/installing-an-apple-certificate-on-macos-runners-for-xcode-development
- name: Install the Apple certificate and provisioning profile
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 list-keychain -d user -s $KEYCHAIN_PATH
# apply provisioning profile
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
- name: Set version and short version
run: echo "VERSION=$(cat version | cut -f1 -d-)" >> $GITHUB_ENV
- name: Create and config export_presets.cfg
run: |
cp game/export_presets.ios.example game/export_presets.cfg
sed -i -e "s|VERSION_CODE|$VERSION|g" $WORKING_DIRECTORY/export_presets.cfg
sed -i -e "s|VERSION_NAME|$VERSION|g" $WORKING_DIRECTORY/export_presets.cfg
sed -i -e "s|IOS_APPSTORE_TEAM_ID|$IOS_APPSTORE_TEAM_ID|g" $WORKING_DIRECTORY/export_presets.cfg
- name: Export and upload to Testflight
uses: dulvui/[email protected]
with:
working-directory: $WORKING_DIRECTORY
godot-version: $GODOT_VERSION
project-name: $PROJECT_NAME
provision-profile-path: ~/Library/MobileDevice/Provisioning\ Profiles/build_pp.mobileprovision
apple-id-username: ${{ secrets.IOS_APPLE_ID_USERNAME }}
apple-id-password: ${{ secrets.IOS_APPLE_ID_PASSWORD }}