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: Distribute Private Beta runs-on: macos-11 environment: name: private_beta strategy: fail-fast: true matrix: # name: ["iOS", "macOS"] name: ["iOS"] 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 env: BUILD_NUMBER: ${{ github.event.inputs.build_number }} PLIST_COMMAND: "Add :com.algoritmico.Passepartout.config:app_type integer 2" PLIST_PATH: "Passepartout/App/Info.plist" run: | ci/set-build.sh $BUILD_NUMBER /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 - name: Tag beta run: | APP_VERSION=`ci/version-number.sh ios` BUILD_NUMBER=`ci/build-number.sh ios` git tag "v$APP_VERSION-pb$BUILD_NUMBER" && git push --tags