Merge branch 'app-store-environments'

This commit is contained in:
Davide De Rosa 2021-10-08 09:26:30 +02:00
commit 7202986d7b
8 changed files with 90 additions and 28 deletions

View File

@ -3,5 +3,6 @@ MATCH_TYPE="appstore"
GYM_EXPORT_METHOD="app-store"
GYM_SKIP_PACKAGE_PKG="false"
DEMO_ACCOUNT_REQUIRED="true"
PILOT_DISTRIBUTE_ONLY="true"
PILOT_DISTRIBUTE_EXTERNAL="true"
PILOT_BETA_APP_DESCRIPTION="Passepartout is a non-official, user-friendly OpenVPN® client."

View File

@ -3,6 +3,6 @@ APP_ROOT="Passepartout/App/iOS"
MATCH_PLATFORM="ios"
GYM_SCHEME="Passepartout-iOS"
DELIVER_PLATFORM="ios"
PILOT_IPA="$DIST_PATH/$PLATFORM/beta/$APP_NAME.ipa"
PILOT_PLATFORM="ios"
APPCENTER_APP_NAME=$GYM_SCHEME
APPCENTER_DISTRIBUTE_IPA="$DIST_PATH/$PLATFORM/dev/$APP_NAME.ipa"

View File

@ -4,6 +4,6 @@ MATCH_PLATFORM="macos"
MATCH_ADDITIONAL_CERT_TYPES="mac_installer_distribution"
GYM_SCHEME="Passepartout-macOS"
DELIVER_PLATFORM="osx"
PILOT_PKG="$DIST_PATH/$PLATFORM/beta/$APP_NAME.pkg"
PILOT_PLATFORM="osx"
APPCENTER_APP_NAME=$GYM_SCHEME
APPCENTER_DISTRIBUTE_FILE="$DIST_PATH/$PLATFORM/dev/$APP_NAME.app"

View File

@ -4,6 +4,7 @@ on:
push:
#branches:
# - master
# - stable
tags:
- 'v*-b*'
#tags-ignore:
@ -15,6 +16,12 @@ env:
APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY }}
FASTLANE_USERNAME: ${{ secrets.FASTLANE_USERNAME }}
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
jobs:
upload_to_app_store:
runs-on: macos-10.15
timeout-minutes: 60
env:
MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }}
@ -22,17 +29,6 @@ env:
MATCH_KEYCHAIN_NAME: ${{ secrets.MATCH_KEYCHAIN_NAME }}
MATCH_KEYCHAIN_PASSWORD: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }}
DELIVER_USERNAME: ${{ secrets.DELIVER_USERNAME }}
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 }}
APPCENTER_OWNER_NAME: ${{ secrets.APPCENTER_OWNER_NAME }}
APPCENTER_API_TOKEN: ${{ secrets.APPCENTER_API_TOKEN }}
jobs:
upload_to_testflight:
runs-on: macos-10.15
timeout-minutes: 60
steps:
- name: Check out repository
uses: actions/checkout@v2
@ -42,7 +38,6 @@ jobs:
- name: Prepare Ruby bundle
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler-cache: true
- name: Select Xcode version
uses: maxim-lobanov/setup-xcode@v1
@ -63,14 +58,69 @@ jobs:
- name: Build (macOS)
run: |
bundle exec fastlane --env mac,beta create_archive
scripts/ci/reset-archive.sh
- name: Build (iOS)
run: |
bundle exec fastlane --env ios,beta create_archive
scripts/ci/reset-archive.sh
- name: Upload to App Store (macOS)
run: |
bundle exec fastlane --env mac,beta store_upload
- name: Upload to App Store (iOS)
run: |
bundle exec fastlane --env ios,beta store_upload
submit_to_testflight:
runs-on: macos-10.15
needs: upload_to_app_store
environment:
name: 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 }}
steps:
- name: Check out repository
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: true
- name: Prepare Ruby bundle
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Submit to TestFlight (macOS)
run: |
PILOT_CHANGELOG=`ci/build-changelog.sh mac` bundle exec fastlane --env mac,beta beta_deploy
export PILOT_CHANGELOG=`ci/build-changelog.sh mac`
bundle exec fastlane --env mac,beta store_beta
- name: Submit to TestFlight (iOS)
run: |
PILOT_CHANGELOG=`ci/build-changelog.sh ios` bundle exec fastlane --env ios,beta beta_deploy
export PILOT_CHANGELOG=`ci/build-changelog.sh ios`
bundle exec fastlane --env ios,beta store_beta
submit_for_app_review:
runs-on: macos-10.15
needs: submit_to_testflight
environment:
name: app_review
env:
DELIVER_USERNAME: ${{ secrets.DELIVER_USERNAME }}
steps:
- name: Check out repository
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: true
- name: Prepare Ruby bundle
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Update App Store Connect metadata (macOS)
run: |
bundle exec fastlane --env mac update_metadata
- name: Update App Store Connect metadata (iOS)
run: |
bundle exec fastlane --env ios update_metadata
- name: Submit for App Review (macOS)
run: |
bundle exec fastlane --env mac store_review
- name: Submit for App Review (iOS)
run: |
bundle exec fastlane --env ios store_review

1
.ruby-version Normal file
View File

@ -0,0 +1 @@
2.7

@ -1 +1 @@
Subproject commit 945f273a3d4fd24d3d2e9cf401d42c354946714a
Subproject commit 7f4d7d415e60ed345a415888e088f7fed0a9b412

View File

@ -1,2 +0,0 @@
#!/bin/sh
git checkout *Info.plist Passepartout.xcodeproj

View File

@ -1,12 +1,24 @@
#!/bin/sh
CURRENT_BRANCH=`git branch --show-current`
if [[ $CURRENT_BRANCH != "master" ]]; then
echo "Not on master branch"
if [[ $CURRENT_BRANCH != "stable" ]]; then
echo "Not on stable branch"
exit
fi
VERSION=`ci/version-number.sh`
DATE=`date "+%Y-%m-%d"`
CHANGELOG_GLOB="Passepartout/App/*/CHANGELOG.md"
sed -i '' -E "s/^.*Beta.*$/## $VERSION ($DATE)/g" $CHANGELOG_GLOB
git commit -am "Release" && git tag -as "v$VERSION"
MESSAGE="Release"
sed -i '' -E "s/^.*Beta.*$/## $VERSION ($DATE)/" $CHANGELOG_GLOB
if ! git commit -am $MESSAGE; then
echo "Failed to commit release"
git reset --hard
exit
fi
if ! git tag -as "v$VERSION" -m $MESSAGE; then
echo "Failed to tag release"
git reset --hard HEAD^
exit
fi