passepartout-apple/.github/workflows/release.yml

185 lines
6.1 KiB
YAML
Raw Normal View History

name: Release
on:
2021-11-30 11:41:42 +00:00
push:
branches:
- "master"
paths:
- ".beta-build"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2021-10-16 09:47:25 +00:00
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
2023-12-16 19:58:54 +00:00
runs-on: macos-13
strategy:
fail-fast: true
matrix:
2024-01-05 23:10:06 +00:00
name: ["iOS", "macOS", "tvOS"]
include:
- name: "iOS"
platform: "ios"
use_version: true
- name: "macOS"
platform: "mac"
2024-01-05 23:06:15 +00:00
- name: "tvOS"
platform: "tvos"
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 }}
GYM_OUTPUT_DIRECTORY: "dist/${{ matrix.platform }}"
steps:
2023-07-06 17:46:01 +00:00
- uses: actions/checkout@v3
with:
submodules: true
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
2023-07-06 17:46:01 +00:00
- uses: actions/setup-go@v4
with:
go-version: "^1.17"
- uses: maxim-lobanov/setup-xcode@v1
with:
2023-12-16 19:58:54 +00:00
xcode-version: "15.1"
- 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: Preinstall certificates (SSH)
run: |
scripts/ci/recognize-match-hostname.sh
bundle exec fastlane --env ${{ matrix.platform }} match development
# - name: Run tests
# run: |
2022-06-25 18:21:49 +00:00
# cd PassepartoutLibrary
# swift test
- name: Build ${{ matrix.name }} app
timeout-minutes: 15
2021-10-01 12:32:08 +00:00
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 }}
2021-10-05 09:24:55 +00:00
run: |
if [ $PLATFORM == "mac" ]; then
export PILOT_PKG="$GYM_OUTPUT_DIRECTORY/Passepartout.pkg"
else
export PILOT_IPA="$GYM_OUTPUT_DIRECTORY/Passepartout.ipa"
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
2021-10-05 09:24:55 +00:00
environment:
name: public_beta
url: "https://testflight.apple.com/join/K71mtLjZ"
2021-10-05 09:24:55 +00:00
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
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
- uses: ruby/setup-ruby@v1
2021-10-05 09:24:55 +00:00
with:
bundler-cache: true
- name: Publish on TestFlight (iOS)
2021-10-01 12:32:08 +00:00
run: |
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
- name: Publish on TestFlight (tvOS)
run: |
bundle exec fastlane --env tvos,beta run pilot
2021-10-06 10:24:49 +00:00
submit_for_app_review:
name: Submit to App Review
runs-on: ubuntu-latest
needs: build_upload
2021-10-06 10:24:49 +00:00
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 }}
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
- uses: ruby/setup-ruby@v1
2021-10-06 10:24:49 +00:00
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
- name: Submit for App Review (tvOS)
run: |
bundle exec fastlane --env tvos 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:
2023-07-06 17:46:01 +00:00
- uses: actions/checkout@v3
with:
submodules: true
- name: Import GPG key
2023-07-06 17:46:01 +00:00
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 }}
2023-07-05 16:07:47 +00:00
draft: true
files: |
${{ env.RELEASE_NOTES }}