Attempt release #132
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
branches: | |
- "master" | |
paths: | |
- ".beta-build" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
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-12 | |
strategy: | |
fail-fast: true | |
matrix: | |
name: ["iOS", "macOS"] | |
include: | |
- name: "iOS" | |
platform: "ios" | |
use_version: true | |
- 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@v3 | |
with: | |
submodules: true | |
- uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: "^1.17" | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: latest-stable | |
- name: Store app version | |
id: app_version | |
if: ${{ matrix.use_version }} | |
run: | | |
VERSION=`ci/version-number.sh $PLATFORM` | |
BUILD=`ci/build-number.sh $PLATFORM` | |
echo "version=$VERSION" >> $GITHUB_OUTPUT | |
echo "build=$BUILD" >> $GITHUB_OUTPUT | |
- 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: Run tests | |
# run: | | |
# cd PassepartoutLibrary | |
# swift test | |
- name: Build ${{ matrix.name }} app | |
timeout-minutes: 15 | |
run: | | |
bundle exec fastlane --env $PLATFORM,beta test_and_build_app test: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 | |
outputs: | |
version: ${{ steps.app_version.outputs.version }} | |
build: ${{ steps.app_version.outputs.build }} | |
distribute_public_beta: | |
name: Distribute Public Beta | |
runs-on: ubuntu-latest | |
needs: build_upload | |
environment: | |
name: public_beta | |
url: "https://testflight.apple.com/join/K71mtLjZ" | |
env: | |
PILOT_APP_VERSION: ${{ needs.build_upload.outputs.version }} | |
PILOT_BUILD_NUMBER: ${{ needs.build_upload.outputs.build }} | |
PILOT_USERNAME: ${{ secrets.PILOT_USERNAME }} | |
PILOT_GROUPS: ${{ secrets.PILOT_GROUPS }} | |
PILOT_NOTIFY_EXTERNAL_TESTERS: ${{ secrets.PILOT_NOTIFY_EXTERNAL_TESTERS }} | |
PILOT_DISTRIBUTE_ONLY: true | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Publish on TestFlight (iOS) | |
run: | | |
bundle exec fastlane --env ios,beta run pilot | |
- name: Publish on TestFlight (macOS) | |
run: | | |
bundle exec fastlane --env mac,beta run pilot | |
submit_for_app_review: | |
name: Submit to App Review | |
runs-on: ubuntu-latest | |
needs: build_upload | |
environment: | |
name: app_review | |
env: | |
DELIVER_USERNAME: ${{ secrets.DELIVER_USERNAME }} | |
DELIVER_APP_VERSION: ${{ needs.build_upload.outputs.version }} | |
DELIVER_BUILD_NUMBER: ${{ needs.build_upload.outputs.build }} | |
DELIVER_FORCE: true | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Submit for App Review (iOS) | |
run: | | |
bundle exec fastlane --env ios deliver_review add_id_info_uses_idfa:false | |
- name: Submit for App Review (macOS) | |
run: | | |
bundle exec fastlane --env mac deliver_review add_id_info_uses_idfa:false | |
publish_to_app_store: | |
name: Publish to App Store | |
runs-on: ubuntu-latest | |
needs: [build_upload, submit_for_app_review] | |
environment: | |
name: app_store | |
env: | |
TAG_NAME: ${{ needs.build_upload.outputs.version }} | |
RELEASE_NOTES: release-notes.txt | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Import GPG key | |
uses: crazy-max/ghaction-import-gpg@v5 | |
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: | | |
scripts/ci/tag-release.sh $TAG_NAME | |
git push --tags | |
- name: Assemble notes | |
run: | | |
scripts/ci/release-notes.sh $TAG_NAME >$RELEASE_NOTES | |
- name: Publish release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: "v${{ env.TAG_NAME }}" | |
body_path: ${{ env.RELEASE_NOTES }} | |
draft: true | |
files: | | |
${{ env.RELEASE_NOTES }} |