passepartout-apple/.github/workflows/private_beta.yml

94 lines
3.3 KiB
YAML
Raw Normal View History

name: Private Beta
on:
workflow_dispatch:
inputs:
build_number:
description: "Build number"
required: true
env:
APP_STORE_CONNECT_API_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY }}
FASTLANE_USERNAME: ${{ secrets.FASTLANE_USERNAME }}
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
BUILD_NUMBER: ${{ github.event.inputs.build_number }}
jobs:
build_upload:
name: Distribute Private Beta
runs-on: macos-11
environment:
name: private_beta
strategy:
fail-fast: true
matrix:
2022-04-13 20:45:08 +00:00
# name: ["iOS", "macOS"]
2022-04-13 20:46:35 +00:00
name: ["iOS"]
include:
- name: "iOS"
platform: "ios"
2022-04-13 20:45:08 +00:00
# - name: "macOS"
# platform: "mac"
env:
PLATFORM: ${{ matrix.platform }}
MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }}
MATCH_GIT_PRIVATE_KEY: ${{ secrets.MATCH_GIT_PRIVATE_KEY }}
MATCH_KEYCHAIN_NAME: ${{ secrets.MATCH_KEYCHAIN_NAME }}
MATCH_KEYCHAIN_PASSWORD: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }}
GYM_OUTPUT_DIRECTORY: "dist/${{ matrix.platform }}"
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- uses: actions/setup-go@v3
with:
go-version: "^1.17"
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Create keychain
uses: ./.github/actions/create-keychain
with:
name: ${{ env.MATCH_KEYCHAIN_NAME }}
password: ${{ env.MATCH_KEYCHAIN_PASSWORD }}
- name: Preinstall certificates (SSH)
run: |
scripts/ci/recognize-match-hostname.sh
bundle exec fastlane --env ${{ matrix.platform }} match development
- name: Tweak build
env:
PLIST_COMMAND: "Add :com.algoritmico.Passepartout.config:app_type integer 2"
PLIST_PATH: "Passepartout/App/Info.plist"
run: |
ci/set-build.sh $BUILD_NUMBER
2022-04-23 08:37:05 +00:00
/usr/libexec/PlistBuddy -c "$PLIST_COMMAND" "$PLIST_PATH"
- name: Build ${{ matrix.name }} app
timeout-minutes: 15
run: |
bundle exec fastlane --env $PLATFORM,beta test_and_build_app test:false ensure_clean:false
- name: Submit to TestFlight
env:
PILOT_USERNAME: ${{ secrets.PILOT_USERNAME }}
PILOT_GROUPS: ${{ secrets.PILOT_GROUPS }}
PILOT_BETA_APP_FEEDBACK: ${{ secrets.PILOT_BETA_APP_FEEDBACK }}
PILOT_BETA_APP_REVIEW_INFO: ${{ secrets.PILOT_BETA_APP_REVIEW_INFO }}
PILOT_NOTIFY_EXTERNAL_TESTERS: ${{ secrets.PILOT_NOTIFY_EXTERNAL_TESTERS }}
CHANGELOG_PREFACE: ${{ secrets.CHANGELOG_PREFACE }}
run: |
if [ $PLATFORM == "ios" ]; then
export PILOT_IPA="$GYM_OUTPUT_DIRECTORY/Passepartout.ipa"
else
export PILOT_PKG="$GYM_OUTPUT_DIRECTORY/Passepartout.pkg"
fi
export PILOT_CHANGELOG=`ci/build-changelog.sh $PLATFORM`
bundle exec fastlane --env $PLATFORM,beta run pilot
2022-04-27 11:37:22 +00:00
- name: Tag beta
run: |
APP_VERSION=`ci/version-number.sh ios`
git tag "v$APP_VERSION-pb$BUILD_NUMBER" && git push --tags