mirror of
https://github.com/passepartoutvpn/passepartout-apple.git
synced 2025-02-16 12:52:11 +00:00
Optimize release workflow
- Enforce 1h keychain lock timeout - Disable xcpretty again for better debugging - Drop redundant names of boilerplate actions - Limit scope of release env variables - Split release pull and tagging - Generate markdown release notes in standalone script
This commit is contained in:
parent
4f9bbac178
commit
ab2aa03c62
2
.github/actions/create-keychain/action.yml
vendored
2
.github/actions/create-keychain/action.yml
vendored
@ -14,7 +14,7 @@ runs:
|
|||||||
KEYCHAIN_NAME: ${{ inputs.name }}
|
KEYCHAIN_NAME: ${{ inputs.name }}
|
||||||
KEYCHAIN_PASSWORD: ${{ inputs.password }}
|
KEYCHAIN_PASSWORD: ${{ inputs.password }}
|
||||||
run: |
|
run: |
|
||||||
bundle exec fastlane run create_keychain unlock:true lock_after_timeout:false
|
bundle exec fastlane run create_keychain unlock:true lock_after_timeout:false timeout:6000
|
||||||
- uses: webiny/action-post-run@2.0.1
|
- uses: webiny/action-post-run@2.0.1
|
||||||
env:
|
env:
|
||||||
KEYCHAIN_NAME: ${{ inputs.name }}
|
KEYCHAIN_NAME: ${{ inputs.name }}
|
||||||
|
84
.github/workflows/release.yml
vendored
84
.github/workflows/release.yml
vendored
@ -11,18 +11,6 @@ env:
|
|||||||
APP_STORE_CONNECT_API_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY }}
|
APP_STORE_CONNECT_API_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY }}
|
||||||
FASTLANE_USERNAME: ${{ secrets.FASTLANE_USERNAME }}
|
FASTLANE_USERNAME: ${{ secrets.FASTLANE_USERNAME }}
|
||||||
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
|
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
|
||||||
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 }}
|
|
||||||
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 }}
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_upload:
|
build_upload:
|
||||||
@ -40,6 +28,12 @@ jobs:
|
|||||||
platform: "mac"
|
platform: "mac"
|
||||||
env:
|
env:
|
||||||
PLATFORM: ${{ matrix.platform }}
|
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 }}"
|
GYM_OUTPUT_DIRECTORY: "dist/${{ matrix.platform }}"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@ -51,6 +45,14 @@ jobs:
|
|||||||
- uses: maxim-lobanov/setup-xcode@v1
|
- uses: maxim-lobanov/setup-xcode@v1
|
||||||
with:
|
with:
|
||||||
xcode-version: latest-stable
|
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 "::set-output name=version::$VERSION"
|
||||||
|
echo "::set-output name=build::$BUILD"
|
||||||
- name: Create keychain
|
- name: Create keychain
|
||||||
uses: ./.github/actions/create-keychain
|
uses: ./.github/actions/create-keychain
|
||||||
with:
|
with:
|
||||||
@ -60,23 +62,22 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
scripts/ci/recognize-match-hostname.sh
|
scripts/ci/recognize-match-hostname.sh
|
||||||
bundle exec fastlane --env ${{ matrix.platform }} match development
|
bundle exec fastlane --env ${{ matrix.platform }} match development
|
||||||
- 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 "::set-output name=version::$VERSION"
|
|
||||||
echo "::set-output name=build::$BUILD"
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
cd PassepartoutCore
|
cd PassepartoutCore
|
||||||
swift test
|
swift test
|
||||||
- name: Build ${{ matrix.name }} app
|
- name: Build ${{ matrix.name }} app
|
||||||
timeout-minutes: 15
|
timeout-minutes: 10
|
||||||
run: |
|
run: |
|
||||||
bundle exec fastlane --env $PLATFORM,beta test_and_build_app test:false
|
bundle exec fastlane --env $PLATFORM,beta test_and_build_app test:false
|
||||||
- name: Submit to TestFlight
|
- 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: |
|
run: |
|
||||||
if [ $PLATFORM == "ios" ]; then
|
if [ $PLATFORM == "ios" ]; then
|
||||||
export PILOT_IPA="$GYM_OUTPUT_DIRECTORY/Passepartout.ipa"
|
export PILOT_IPA="$GYM_OUTPUT_DIRECTORY/Passepartout.ipa"
|
||||||
@ -96,18 +97,17 @@ jobs:
|
|||||||
name: public_beta
|
name: public_beta
|
||||||
url: "https://testflight.apple.com/join/K71mtLjZ"
|
url: "https://testflight.apple.com/join/K71mtLjZ"
|
||||||
env:
|
env:
|
||||||
PILOT_USERNAME: ${{ secrets.PILOT_USERNAME }}
|
|
||||||
PILOT_GROUPS: ${{ secrets.PILOT_GROUPS }}
|
|
||||||
PILOT_APP_VERSION: ${{ needs.build_upload.outputs.version }}
|
PILOT_APP_VERSION: ${{ needs.build_upload.outputs.version }}
|
||||||
PILOT_BUILD_NUMBER: ${{ needs.build_upload.outputs.build }}
|
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
|
PILOT_DISTRIBUTE_ONLY: true
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- uses: actions/checkout@v2
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Prepare Ruby bundle
|
- uses: ruby/setup-ruby@v1
|
||||||
uses: ruby/setup-ruby@v1
|
|
||||||
with:
|
with:
|
||||||
bundler-cache: true
|
bundler-cache: true
|
||||||
- name: Publish on TestFlight (iOS)
|
- name: Publish on TestFlight (iOS)
|
||||||
@ -131,12 +131,10 @@ jobs:
|
|||||||
DELIVER_BUILD_NUMBER: ${{ needs.build_upload.outputs.build }}
|
DELIVER_BUILD_NUMBER: ${{ needs.build_upload.outputs.build }}
|
||||||
DELIVER_FORCE: true
|
DELIVER_FORCE: true
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- uses: actions/checkout@v2
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Prepare Ruby bundle
|
- uses: ruby/setup-ruby@v1
|
||||||
uses: ruby/setup-ruby@v1
|
|
||||||
with:
|
with:
|
||||||
bundler-cache: true
|
bundler-cache: true
|
||||||
- name: Submit for App Review (iOS)
|
- name: Submit for App Review (iOS)
|
||||||
@ -153,9 +151,9 @@ jobs:
|
|||||||
name: app_store
|
name: app_store
|
||||||
env:
|
env:
|
||||||
TAG_NAME: ${{ needs.build_upload.outputs.version }}
|
TAG_NAME: ${{ needs.build_upload.outputs.version }}
|
||||||
|
RELEASE_NOTES: release-notes.txt
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- uses: actions/checkout@v2
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Import GPG key
|
- name: Import GPG key
|
||||||
@ -167,27 +165,21 @@ jobs:
|
|||||||
git_commit_gpgsign: true
|
git_commit_gpgsign: true
|
||||||
git_tag_gpgsign: true
|
git_tag_gpgsign: true
|
||||||
git_push_gpgsign: false
|
git_push_gpgsign: false
|
||||||
- name: Tag release
|
- name: Pull metadata updates
|
||||||
run: |
|
run: |
|
||||||
git pull --no-tags origin $GITHUB_REF_NAME
|
git pull --no-tags origin $GITHUB_REF_NAME
|
||||||
git submodule update --recursive
|
git submodule update --recursive
|
||||||
|
- name: Tag release
|
||||||
|
run: |
|
||||||
scripts/ci/commit-release.sh $TAG_NAME
|
scripts/ci/commit-release.sh $TAG_NAME
|
||||||
git push && git push --tags
|
git push && git push --tags
|
||||||
- name: Assemble notes
|
- name: Assemble notes
|
||||||
run: |
|
run: |
|
||||||
RELEASE_NOTES="release-notes.txt"
|
scripts/ci/release-notes.sh $TAG_NAME >$RELEASE_NOTES
|
||||||
echo "# App Store" >$RELEASE_NOTES
|
|
||||||
echo >>$RELEASE_NOTES
|
|
||||||
echo "## iOS" >>$RELEASE_NOTES
|
|
||||||
echo >>$RELEASE_NOTES
|
|
||||||
cat Passepartout/App/iOS/fastlane/metadata/en-US/release_notes.txt >>$RELEASE_NOTES
|
|
||||||
echo "## macOS" >>$RELEASE_NOTES
|
|
||||||
echo >>$RELEASE_NOTES
|
|
||||||
cat Passepartout/App/macOS/fastlane/metadata/en-US/release_notes.txt >>$RELEASE_NOTES
|
|
||||||
- name: Publish release
|
- name: Publish release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
tag_name: "v${{ needs.build_upload.outputs.version }}"
|
tag_name: "v${{ env.TAG_NAME }}"
|
||||||
body_path: release-notes.txt
|
body_path: ${{ env.RELEASE_NOTES }}
|
||||||
files: |
|
files: |
|
||||||
release-notes.txt
|
${{ env.RELEASE_NOTES }}
|
||||||
|
@ -17,3 +17,5 @@ skip_profile_detection true
|
|||||||
build_path "build"
|
build_path "build"
|
||||||
derived_data_path "build/derived_data"
|
derived_data_path "build/derived_data"
|
||||||
#cloned_source_packages_path "build/sources"
|
#cloned_source_packages_path "build/sources"
|
||||||
|
|
||||||
|
disable_xcpretty true
|
||||||
|
18
scripts/ci/release-notes.sh
Executable file
18
scripts/ci/release-notes.sh
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
VERSION=$1
|
||||||
|
if [[ -z $VERSION ]]; then
|
||||||
|
echo "Must provide version"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
APP_ROOT="Passepartout/App"
|
||||||
|
echo "# App Store"
|
||||||
|
echo
|
||||||
|
grep $VERSION $APP_ROOT/iOS/CHANGELOG.md | cut -f 2- -d " "
|
||||||
|
echo
|
||||||
|
echo "## iOS"
|
||||||
|
echo
|
||||||
|
cat $APP_ROOT/iOS/fastlane/metadata/en-US/release_notes.txt
|
||||||
|
echo "## macOS"
|
||||||
|
echo
|
||||||
|
cat $APP_ROOT/macOS/fastlane/metadata/en-US/release_notes.txt
|
Loading…
Reference in New Issue
Block a user