player profile: show offer button only for players not in your team #137
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
# SPDX-FileCopyrightText: 2023 Simon Dalvai <[email protected]> | |
# SPDX-License-Identifier: CC0-1.0 | |
name: iOS upload | |
on: | |
push: | |
# paths: | |
# - ".github/workflows/upload-ios.yml" | |
# - "exportOptions.plist" | |
# - "export_presets.ios.example" | |
env: | |
GODOT_VERSION: 4.3 | |
PROJECT_NAME: FutsalManager | |
WORKING_DIRECTORY: game | |
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/main' | |
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: Create export_presets.cfg | |
run: cp game/export_presets.ios.example game/export_presets.cfg | |
- name: Extract Provisioning profile UUID and create GODOT_IOS_PROVISIONING_PROFILE_UUID_RELEASE env variable | |
run: | | |
PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision | |
echo "GODOT_IOS_PROVISIONING_PROFILE_UUID_RELEASE=$(grep -a -A 1 'UUID' $PP_PATH | grep string | \ | |
sed -e "s|<string>||" -e "s|</string>||" | tr -d '\t')" >> $GITHUB_ENV | |
- name: Export XCode project | |
uses: dulvui/godot4-ios-export@v1 | |
env: | |
CODE_SIGN_IDENTITY: "Apple Distribution" | |
with: | |
working-directory: $WORKING_DIRECTORY | |
godot-version: $GODOT_VERSION | |
- name: Publish the App on TestFlight | |
if: success() | |
run: | | |
xcrun altool \ | |
--upload-app \ | |
-t ios \ | |
-f *.ipa \ | |
-u "${{ secrets.IOS_APPLE_ID_USERNAME }}" \ | |
-p "${{ secrets.IOS_APPLE_ID_PASSWORD }}" \ | |
--verbose | |