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:
|
|
|
|
branches:
|
2021-12-04 09:38:44 +00:00
|
|
|
- "master"
|
2021-11-30 15:36:39 +00:00
|
|
|
paths:
|
2021-12-04 09:38:44 +00:00
|
|
|
- ".beta-build"
|
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 }}
|
|
|
|
|
|
|
|
jobs:
|
2021-12-03 14:31:19 +00:00
|
|
|
build_upload:
|
|
|
|
name: Upload to ASC
|
2022-05-17 14:36:53 +00:00
|
|
|
runs-on: macos-12
|
2021-12-03 14:31:19 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: true
|
|
|
|
matrix:
|
|
|
|
name: ["iOS", "macOS"]
|
|
|
|
include:
|
|
|
|
- name: "iOS"
|
|
|
|
platform: "ios"
|
|
|
|
use_version: true
|
|
|
|
- name: "macOS"
|
|
|
|
platform: "mac"
|
|
|
|
env:
|
|
|
|
PLATFORM: ${{ matrix.platform }}
|
2021-12-04 22:46:30 +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 }}
|
|
|
|
MATCH_KEYCHAIN_NAME: ${{ secrets.MATCH_KEYCHAIN_NAME }}
|
|
|
|
MATCH_KEYCHAIN_PASSWORD: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }}
|
2021-12-03 14:31:19 +00:00
|
|
|
GYM_OUTPUT_DIRECTORY: "dist/${{ matrix.platform }}"
|
2021-11-11 21:39:23 +00:00
|
|
|
steps:
|
2023-07-06 17:46:01 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-09-27 17:33:22 +00:00
|
|
|
with:
|
2021-11-11 21:39:23 +00:00
|
|
|
submodules: true
|
2021-12-04 09:38:44 +00:00
|
|
|
- uses: ruby/setup-ruby@v1
|
2021-12-03 14:31:19 +00:00
|
|
|
with:
|
2021-12-04 09:38:44 +00:00
|
|
|
bundler-cache: true
|
2023-07-06 17:46:01 +00:00
|
|
|
- uses: actions/setup-go@v4
|
2022-04-12 20:55:39 +00:00
|
|
|
with:
|
|
|
|
go-version: "^1.17"
|
2021-12-04 09:38:44 +00:00
|
|
|
- uses: maxim-lobanov/setup-xcode@v1
|
|
|
|
with:
|
|
|
|
xcode-version: latest-stable
|
2021-12-04 22:46:30 +00:00
|
|
|
- name: Store app version
|
|
|
|
id: app_version
|
|
|
|
if: ${{ matrix.use_version }}
|
|
|
|
run: |
|
|
|
|
VERSION=`ci/version-number.sh $PLATFORM`
|
|
|
|
BUILD=`ci/build-number.sh $PLATFORM`
|
2022-10-17 06:35:36 +00:00
|
|
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
|
|
|
echo "build=$BUILD" >> $GITHUB_OUTPUT
|
2021-12-04 09:38:44 +00:00
|
|
|
- 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
|
2022-04-12 20:55:39 +00:00
|
|
|
# - name: Run tests
|
|
|
|
# run: |
|
2022-06-25 18:21:49 +00:00
|
|
|
# cd PassepartoutLibrary
|
2022-04-12 20:55:39 +00:00
|
|
|
# swift test
|
2021-12-03 14:31:19 +00:00
|
|
|
- name: Build ${{ matrix.name }} app
|
2022-04-12 20:55:39 +00:00
|
|
|
timeout-minutes: 15
|
2021-10-01 12:32:08 +00:00
|
|
|
run: |
|
2021-12-03 14:31:19 +00:00
|
|
|
bundle exec fastlane --env $PLATFORM,beta test_and_build_app test:false
|
2021-11-11 21:39:23 +00:00
|
|
|
- name: Submit to TestFlight
|
2021-12-04 22:46:30 +00:00
|
|
|
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 }}
|
2021-10-05 09:24:55 +00:00
|
|
|
run: |
|
2021-12-03 14:31:19 +00:00
|
|
|
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
|
|
|
|
outputs:
|
|
|
|
version: ${{ steps.app_version.outputs.version }}
|
|
|
|
build: ${{ steps.app_version.outputs.build }}
|
|
|
|
distribute_public_beta:
|
|
|
|
name: Distribute Public Beta
|
2021-10-08 09:16:30 +00:00
|
|
|
runs-on: ubuntu-latest
|
2021-12-03 14:31:19 +00:00
|
|
|
needs: build_upload
|
2021-10-05 09:24:55 +00:00
|
|
|
environment:
|
2021-10-15 20:23:41 +00:00
|
|
|
name: public_beta
|
2021-12-03 14:31:19 +00:00
|
|
|
url: "https://testflight.apple.com/join/K71mtLjZ"
|
2021-10-05 09:24:55 +00:00
|
|
|
env:
|
2021-12-03 14:31:19 +00:00
|
|
|
PILOT_APP_VERSION: ${{ needs.build_upload.outputs.version }}
|
|
|
|
PILOT_BUILD_NUMBER: ${{ needs.build_upload.outputs.build }}
|
2021-12-04 22:46:30 +00:00
|
|
|
PILOT_USERNAME: ${{ secrets.PILOT_USERNAME }}
|
|
|
|
PILOT_GROUPS: ${{ secrets.PILOT_GROUPS }}
|
|
|
|
PILOT_NOTIFY_EXTERNAL_TESTERS: ${{ secrets.PILOT_NOTIFY_EXTERNAL_TESTERS }}
|
2021-10-15 20:23:41 +00:00
|
|
|
PILOT_DISTRIBUTE_ONLY: true
|
2021-10-05 09:24:55 +00:00
|
|
|
steps:
|
2023-07-06 17:46:01 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-10-05 09:24:55 +00:00
|
|
|
with:
|
|
|
|
submodules: true
|
2021-12-04 22:46:30 +00:00
|
|
|
- uses: ruby/setup-ruby@v1
|
2021-10-05 09:24:55 +00:00
|
|
|
with:
|
|
|
|
bundler-cache: true
|
2021-10-27 16:47:08 +00:00
|
|
|
- name: Publish on TestFlight (iOS)
|
2021-10-01 12:32:08 +00:00
|
|
|
run: |
|
2021-12-03 14:31:19 +00:00
|
|
|
bundle exec fastlane --env ios,beta run pilot
|
2022-07-17 12:48:14 +00:00
|
|
|
- name: Publish on TestFlight (macOS)
|
|
|
|
run: |
|
|
|
|
bundle exec fastlane --env mac,beta run pilot
|
2021-10-06 10:24:49 +00:00
|
|
|
submit_for_app_review:
|
2021-12-03 14:31:19 +00:00
|
|
|
name: Submit to App Review
|
2021-10-08 09:16:30 +00:00
|
|
|
runs-on: ubuntu-latest
|
2021-12-03 14:31:19 +00:00
|
|
|
needs: build_upload
|
2021-10-06 10:24:49 +00:00
|
|
|
environment:
|
|
|
|
name: app_review
|
|
|
|
env:
|
|
|
|
DELIVER_USERNAME: ${{ secrets.DELIVER_USERNAME }}
|
2021-12-03 14:31:19 +00:00
|
|
|
DELIVER_APP_VERSION: ${{ needs.build_upload.outputs.version }}
|
|
|
|
DELIVER_BUILD_NUMBER: ${{ needs.build_upload.outputs.build }}
|
2021-10-16 13:56:16 +00:00
|
|
|
DELIVER_FORCE: true
|
2021-10-06 10:24:49 +00:00
|
|
|
steps:
|
2023-07-06 17:46:01 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-10-06 10:24:49 +00:00
|
|
|
with:
|
|
|
|
submodules: true
|
2021-12-04 22:46:30 +00:00
|
|
|
- uses: ruby/setup-ruby@v1
|
2021-10-06 10:24:49 +00:00
|
|
|
with:
|
|
|
|
bundler-cache: true
|
|
|
|
- name: Submit for App Review (iOS)
|
|
|
|
run: |
|
2021-12-03 14:31:19 +00:00
|
|
|
bundle exec fastlane --env ios deliver_review add_id_info_uses_idfa:false
|
2021-11-11 21:39:23 +00:00
|
|
|
- name: Submit for App Review (macOS)
|
|
|
|
run: |
|
2021-12-03 14:31:19 +00:00
|
|
|
bundle exec fastlane --env mac deliver_review add_id_info_uses_idfa:false
|
|
|
|
publish_to_app_store:
|
|
|
|
name: Publish to App Store
|
2021-11-30 10:27:05 +00:00
|
|
|
runs-on: ubuntu-latest
|
2022-09-25 09:40:06 +00:00
|
|
|
needs: [build_upload, submit_for_app_review]
|
2021-11-30 10:27:05 +00:00
|
|
|
environment:
|
|
|
|
name: app_store
|
2021-12-03 14:31:19 +00:00
|
|
|
env:
|
|
|
|
TAG_NAME: ${{ needs.build_upload.outputs.version }}
|
2021-12-04 22:46:30 +00:00
|
|
|
RELEASE_NOTES: release-notes.txt
|
2021-11-30 10:27:05 +00:00
|
|
|
steps:
|
2023-07-06 17:46:01 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-11-30 10:27:05 +00:00
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- name: Import GPG key
|
2023-07-06 17:46:01 +00:00
|
|
|
uses: crazy-max/ghaction-import-gpg@v5
|
2021-11-30 10:27:05 +00:00
|
|
|
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
|
2021-12-04 22:46:30 +00:00
|
|
|
- name: Tag release
|
|
|
|
run: |
|
2021-12-03 14:31:19 +00:00
|
|
|
scripts/ci/commit-release.sh $TAG_NAME
|
2022-10-30 11:56:49 +00:00
|
|
|
git push --tags
|
2021-11-30 10:27:05 +00:00
|
|
|
- name: Assemble notes
|
|
|
|
run: |
|
2021-12-04 22:46:30 +00:00
|
|
|
scripts/ci/release-notes.sh $TAG_NAME >$RELEASE_NOTES
|
2021-11-30 10:27:05 +00:00
|
|
|
- name: Publish release
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
with:
|
2021-12-04 22:46:30 +00:00
|
|
|
tag_name: "v${{ env.TAG_NAME }}"
|
|
|
|
body_path: ${{ env.RELEASE_NOTES }}
|
2023-07-05 16:07:47 +00:00
|
|
|
draft: true
|
2021-11-30 10:27:05 +00:00
|
|
|
files: |
|
2021-12-04 22:46:30 +00:00
|
|
|
${{ env.RELEASE_NOTES }}
|