Add manual workflow for private beta

Tolerate dirty repo (for tweaking Info.plist).

Should refactor later to reuse build tasks from release workflow
as local actions.
This commit is contained in:
Davide De Rosa 2022-04-13 21:53:05 +02:00
parent 2565b9f3d0
commit 57a041ca7c
2 changed files with 85 additions and 1 deletions

84
.github/workflows/private_beta.yml vendored Normal file
View File

@ -0,0 +1,84 @@
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 }}
jobs:
build_upload:
name: Upload to ASC
runs-on: macos-11
environment:
name: private_beta
strategy:
fail-fast: true
matrix:
name: ["iOS", "macOS"]
include:
- name: "iOS"
platform: "ios"
- 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
run: |
ci/set-build.sh ${{ github.event.inputs.build_number }}
/usr/libexec/PlistBuddy -c "Add :com.algoritmico.Passepartout.config:app_type integer 2" Passepartout/App/Shared/Info.plist
- 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: false
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

@ -1 +1 @@
Subproject commit f894bc47e7cd12f7c2db8071ba02e67c27c168b9
Subproject commit 4602f7cb05f5b907ee5e5a9309964cb335db9b59