2021-12-03 14:31:19 +00:00
|
|
|
name: Release
|
2021-09-27 17:33:22 +00:00
|
|
|
|
|
|
|
on:
|
2021-11-30 11:41:42 +00:00
|
|
|
push:
|
2024-09-23 13:02:26 +00:00
|
|
|
tags:
|
|
|
|
- "builds/*"
|
2021-09-27 17:33:22 +00:00
|
|
|
|
|
|
|
env:
|
2022-05-17 21:16:32 +00:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2021-10-16 09:47:25 +00:00
|
|
|
APP_STORE_CONNECT_API_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY }}
|
2021-09-27 17:33:22 +00:00
|
|
|
FASTLANE_USERNAME: ${{ secrets.FASTLANE_USERNAME }}
|
|
|
|
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
|
2024-09-24 15:56:27 +00:00
|
|
|
TESTFLIGHT_PREFACE: ${{ vars.TESTFLIGHT_PREFACE }}
|
2024-09-24 15:51:01 +00:00
|
|
|
XCODEPROJ: "Passepartout.xcodeproj/project.pbxproj"
|
2021-09-27 17:33:22 +00:00
|
|
|
|
2024-09-23 13:02:26 +00:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2021-09-27 17:33:22 +00:00
|
|
|
jobs:
|
2024-11-12 17:46:21 +00:00
|
|
|
run_tests:
|
|
|
|
name: Run tests
|
2024-11-13 18:17:00 +00:00
|
|
|
runs-on: macos-15
|
2024-11-12 17:46:21 +00:00
|
|
|
timeout-minutes: 15
|
|
|
|
steps:
|
|
|
|
- uses: passepartoutvpn/action-prepare-xcode-build@master
|
|
|
|
with:
|
|
|
|
access_token: ${{ secrets.ACCESS_TOKEN }}
|
2024-11-27 18:10:23 +00:00
|
|
|
- name: Save app version
|
|
|
|
id: app_version
|
|
|
|
run: |
|
|
|
|
VERSION=`ci/version-number.sh $XCODEPROJ`
|
|
|
|
BUILD=`ci/build-number.sh $XCODEPROJ`
|
|
|
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
|
|
|
echo "build=$BUILD" >> $GITHUB_OUTPUT
|
|
|
|
- name: Run Xcode tests
|
|
|
|
run: |
|
2024-11-12 17:46:21 +00:00
|
|
|
bundle exec fastlane test
|
2024-11-27 18:10:23 +00:00
|
|
|
outputs:
|
|
|
|
version: ${{ steps.app_version.outputs.version }}
|
|
|
|
build: ${{ steps.app_version.outputs.build }}
|
2021-12-03 14:31:19 +00:00
|
|
|
build_upload:
|
|
|
|
name: Upload to ASC
|
2024-11-13 18:17:00 +00:00
|
|
|
runs-on: macos-15
|
2024-11-12 17:46:21 +00:00
|
|
|
needs: run_tests
|
2021-12-03 14:31:19 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: true
|
|
|
|
matrix:
|
2024-10-31 09:02:21 +00:00
|
|
|
platform: ["iOS", "macOS", "tvOS"]
|
2021-11-11 21:39:23 +00:00
|
|
|
steps:
|
2024-09-24 09:17:52 +00:00
|
|
|
- uses: passepartoutvpn/action-prepare-xcode-build@master
|
2021-12-03 14:31:19 +00:00
|
|
|
with:
|
2024-09-24 09:17:52 +00:00
|
|
|
access_token: ${{ secrets.ACCESS_TOKEN }}
|
|
|
|
- name: Upload ${{ matrix.platform }} app
|
2024-09-23 13:02:26 +00:00
|
|
|
id: upload_app
|
2024-11-12 17:35:44 +00:00
|
|
|
timeout-minutes: 30
|
2021-12-04 22:46:30 +00:00
|
|
|
env:
|
2024-09-23 13:02:26 +00:00
|
|
|
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 }}
|
2021-12-04 22:46:30 +00:00
|
|
|
PILOT_BETA_APP_FEEDBACK: ${{ secrets.PILOT_BETA_APP_FEEDBACK }}
|
|
|
|
PILOT_BETA_APP_REVIEW_INFO: ${{ secrets.PILOT_BETA_APP_REVIEW_INFO }}
|
2024-09-23 13:02:26 +00:00
|
|
|
PILOT_GROUPS: ${{ vars.PILOT_GROUPS }}
|
2024-01-07 11:17:46 +00:00
|
|
|
run: |
|
2024-09-23 13:02:26 +00:00
|
|
|
ci/recognize-match-hostname.sh
|
|
|
|
bundle exec fastlane --env ${{ matrix.platform }} beta
|
2024-09-24 09:17:52 +00:00
|
|
|
distribute_public_beta:
|
|
|
|
name: Distribute Public Beta
|
|
|
|
runs-on: ubuntu-latest
|
2024-11-27 18:10:23 +00:00
|
|
|
needs: [run_tests, build_upload]
|
2024-09-24 09:17:52 +00:00
|
|
|
environment:
|
|
|
|
name: public_beta
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: ruby/setup-ruby@v1
|
|
|
|
with:
|
|
|
|
bundler-cache: true
|
|
|
|
- name: Publish on TestFlight
|
2024-09-24 15:51:01 +00:00
|
|
|
env:
|
2024-11-27 18:10:23 +00:00
|
|
|
PILOT_APP_VERSION: ${{ needs.run_tests.outputs.version }}
|
|
|
|
PILOT_BUILD_NUMBER: ${{ needs.run_tests.outputs.build }}
|
2024-09-24 15:51:01 +00:00
|
|
|
PILOT_GROUPS: ${{ vars.PILOT_GROUPS }}
|
|
|
|
PILOT_NOTIFY_EXTERNAL_TESTERS: ${{ vars.PILOT_NOTIFY_EXTERNAL_TESTERS }}
|
2024-09-24 09:17:52 +00:00
|
|
|
run: |
|
2024-10-31 09:02:21 +00:00
|
|
|
PLATFORMS=("iOS" "macOS" "tvOS")
|
2024-09-24 09:17:52 +00:00
|
|
|
for PLATFORM in ${PLATFORMS[@]}; do
|
|
|
|
bundle exec fastlane --env $PLATFORM public_beta
|
|
|
|
done
|
2024-11-27 18:10:23 +00:00
|
|
|
submit_for_app_review:
|
|
|
|
name: Submit to App Review
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: [run_tests, build_upload]
|
|
|
|
environment:
|
|
|
|
name: app_review
|
|
|
|
env:
|
|
|
|
DELIVER_APP_VERSION: ${{ needs.run_tests.outputs.version }}
|
|
|
|
DELIVER_BUILD_NUMBER: ${{ needs.run_tests.outputs.build }}
|
|
|
|
DELIVER_FORCE: true
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: ruby/setup-ruby@v1
|
|
|
|
with:
|
|
|
|
bundler-cache: true
|
|
|
|
- name: Submit for App Review
|
|
|
|
run: |
|
|
|
|
PLATFORMS=("iOS" "macOS" "tvOS")
|
|
|
|
for PLATFORM in ${PLATFORMS[@]}; do
|
|
|
|
bundle exec fastlane --env $PLATFORM asc_review
|
|
|
|
done
|
|
|
|
publish_to_app_store:
|
|
|
|
name: Publish to App Store
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: [run_tests, build_upload, submit_for_app_review]
|
|
|
|
environment:
|
|
|
|
name: app_store
|
|
|
|
env:
|
|
|
|
APP_VERSION: ${{ needs.run_tests.outputs.version }}
|
|
|
|
RELEASE_NOTES: CHANGELOG.txt
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Import GPG key
|
|
|
|
uses: crazy-max/ghaction-import-gpg@v6
|
|
|
|
with:
|
|
|
|
gpg_private_key: ${{ secrets.GPG_KEY }}
|
|
|
|
passphrase: ${{ secrets.GPG_PASSPHRASE }}
|
|
|
|
git_user_signingkey: true
|
|
|
|
git_commit_gpgsign: true
|
|
|
|
git_tag_gpgsign: true
|
|
|
|
git_push_gpgsign: false
|
|
|
|
- name: Tag release
|
|
|
|
run: |
|
|
|
|
bundle exec fastlane tag_release version:$APP_VERSION
|
|
|
|
- name: Publish release
|
|
|
|
uses: softprops/action-gh-release@v2
|
|
|
|
with:
|
|
|
|
tag_name: "v${{ env.APP_VERSION }}"
|
|
|
|
body_path: ${{ env.RELEASE_NOTES }}
|
|
|
|
draft: true
|
|
|
|
files: |
|
|
|
|
${{ env.RELEASE_NOTES }}
|