Rewrite beta local/remote flow

- Merge envs
- Explicit lanes in workflow
This commit is contained in:
Davide De Rosa 2021-10-04 19:21:14 +02:00
parent ea10f89727
commit 0a6894d82c
18 changed files with 58 additions and 62 deletions

1
.env
View File

@ -3,6 +3,7 @@ APP_NAME="Passepartout"
#MATCH_READONLY="true" #MATCH_READONLY="true"
BUILD_PATH="build" BUILD_PATH="build"
DIST_PATH="dist" DIST_PATH="dist"
CHANGELOG_PREFACE="templates/CHANGELOG.preface.md"
# constant (fastlane) # constant (fastlane)
LC_ALL="en_US.UTF-8" LC_ALL="en_US.UTF-8"

View File

@ -1 +1,7 @@
TARGET="beta" TARGET="beta"
MATCH_TYPE="appstore"
GYM_EXPORT_METHOD="app-store"
GYM_SKIP_PACKAGE_PKG="false"
DEMO_ACCOUNT_REQUIRED="true"
PILOT_DISTRIBUTE_EXTERNAL="true"
PILOT_BETA_APP_DESCRIPTION="Passepartout is a non-official, user-friendly OpenVPN® client."

View File

@ -1,6 +0,0 @@
MATCH_TYPE="appstore"
GYM_EXPORT_METHOD="app-store"
DEMO_ACCOUNT_REQUIRED="true"
PILOT_IPA="$DIST_PATH/$PLATFORM/$TARGET/$APP_NAME.ipa"
PILOT_DISTRIBUTE_EXTERNAL="true"
PILOT_BETA_APP_DESCRIPTION="Passepartout is a non-official, user-friendly OpenVPN® client."

View File

@ -1,4 +0,0 @@
MATCH_TYPE="appstore"
MATCH_ADDITIONAL_CERT_TYPES="mac_installer_distribution"
GYM_EXPORT_METHOD="app-store"
GYM_SKIP_PACKAGE_PKG="false"

View File

@ -1,2 +1,5 @@
TARGET="dev" TARGET="dev"
MATCH_TYPE="adhoc"
GYM_EXPORT_METHOD="ad-hoc"
GYM_SKIP_PACKAGE_PKG="true"
APPCENTER_DISTRIBUTE_DESTINATION_TYPE="group" APPCENTER_DISTRIBUTE_DESTINATION_TYPE="group"

View File

@ -1,4 +0,0 @@
MATCH_TYPE="adhoc"
GYM_EXPORT_METHOD="ad-hoc"
APPCENTER_APP_NAME=$GYM_SCHEME
APPCENTER_DISTRIBUTE_IPA="$DIST_PATH/$PLATFORM/$TARGET/$APP_NAME.ipa"

View File

@ -1,8 +0,0 @@
MATCH_TYPE="development"
GYM_EXPORT_METHOD="development"
GYM_SKIP_PACKAGE_PKG="true"
APPCENTER_APP_NAME=$GYM_SCHEME
APPCENTER_DISTRIBUTE_FILE="$DIST_PATH/$PLATFORM/$TARGET/$APP_NAME.app"
FL_NOTARIZE_PACKAGE=$APPCENTER_DISTRIBUTE_FILE
FL_NOTARIZE_PRINT_LOG=true
FL_NOTARIZE_VERBOSE=true

View File

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

View File

@ -1,6 +1,9 @@
PLATFORM="mac" PLATFORM="mac"
MATCH_PLATFORM="macos"
DELIVER_PLATFORM="osx"
GYM_SCHEME="Passepartout-macOS"
BUNDLE_CONTEXT="ios"
APP_ROOT="Passepartout/App/macOS" APP_ROOT="Passepartout/App/macOS"
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"
APPCENTER_APP_NAME=$GYM_SCHEME
APPCENTER_DISTRIBUTE_FILE="$DIST_PATH/$PLATFORM/dev/$APP_NAME.app"

View File

@ -25,6 +25,7 @@ env:
PILOT_USERNAME: ${{ secrets.PILOT_USERNAME }} PILOT_USERNAME: ${{ secrets.PILOT_USERNAME }}
PILOT_GROUPS: ${{ secrets.PILOT_GROUPS }} PILOT_GROUPS: ${{ secrets.PILOT_GROUPS }}
PILOT_BETA_APP_FEEDBACK: ${{ secrets.PILOT_BETA_APP_FEEDBACK }} 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_OWNER_NAME: ${{ secrets.APPCENTER_OWNER_NAME }}
APPCENTER_API_TOKEN: ${{ secrets.APPCENTER_API_TOKEN }} APPCENTER_API_TOKEN: ${{ secrets.APPCENTER_API_TOKEN }}
@ -57,22 +58,18 @@ jobs:
- name: Prepare for fastlane match - name: Prepare for fastlane match
run: | run: |
scripts/recognize-match-hostname.sh scripts/recognize-match-hostname.sh
bundle exec fastlane run create_keychain name:"$MATCH_KEYCHAIN_NAME" password:"$MATCH_KEYCHAIN_PASSWORD" bundle exec fastlane preinstall_development_certs
ci/update-certs.sh mac development
ci/update-certs.sh ios development
- name: Build (macOS) - name: Build (macOS)
run: | run: |
ci/beta-archive.sh mac bundle exec fastlane --env mac,beta create_archive
scripts/reset-archive.sh scripts/reset-archive.sh
- name: Build (iOS) - name: Build (iOS)
run: | run: |
ci/beta-archive.sh ios bundle exec fastlane --env ios,beta create_archive
scripts/reset-archive.sh scripts/reset-archive.sh
- name: Send to App Store (macOS) - name: Submit to TestFlight (macOS)
run: | run: |
ci/set-build-changelog.sh mac PILOT_CHANGELOG=`ci/build-changelog.sh mac` bundle exec fastlane --env mac,beta beta_deploy
ci/store-deploy.sh mac
- name: Submit to TestFlight (iOS) - name: Submit to TestFlight (iOS)
run: | run: |
ci/set-build-changelog.sh ios PILOT_CHANGELOG=`ci/build-changelog.sh ios` bundle exec fastlane --env ios,beta beta_deploy
ci/beta-deploy.sh ios

2
.gitignore vendored
View File

@ -13,8 +13,6 @@ Pods
**/fastlane/metadata/trade_representative_contact_information **/fastlane/metadata/trade_representative_contact_information
build/ build/
dist/ dist/
templates/CHANGELOG.ios.md
templates/CHANGELOG.mac.md
templates/new-strings.txt templates/new-strings.txt
iap/ iap/
.env.secret* .env.secret*

@ -1 +1 @@
Subproject commit 0d2a83844998c38ed44a6850a2477978881263ca Subproject commit e0bfc0d42300df9e06f89ef919884efa3e671e67

View File

@ -1,4 +1,4 @@
app_identifier("com.algoritmico.#{ENV['BUNDLE_CONTEXT']}.Passepartout") # The bundle identifier of your app app_identifier("com.algoritmico.ios.Passepartout") # The bundle identifier of your app
# For more information about the Appfile, see: # For more information about the Appfile, see:

View File

@ -14,3 +14,20 @@
# update_fastlane # update_fastlane
import("../Submodules/fastlane-ci-templates/fastlane/Fastfile.include") import("../Submodules/fastlane-ci-templates/fastlane/Fastfile.include")
desc "Preinstall development certificates"
lane :preinstall_development_certs do
create_keychain(
name: ENV["MATCH_KEYCHAIN_NAME"],
password: ENV["MATCH_KEYCHAIN_PASSWORD"]
)
app_store_connect_api_key
match(
platform: "macos",
type: "development"
)
match(
platform: "ios",
type: "development"
)
end

View File

@ -10,9 +10,8 @@
# sdk "iphoneos9.0" # sdk "iphoneos9.0"
build_target = ENV["TARGET"] stage_build_path = "#{ENV["BUILD_PATH"]}/#{ENV["PLATFORM"]}/#{ENV["TARGET"]}"
stage_build_path = "#{ENV["BUILD_PATH"]}/#{ENV["PLATFORM"]}/#{build_target}" stage_artifacts_path = "#{ENV["DIST_PATH"]}/#{ENV["PLATFORM"]}/#{ENV["TARGET"]}"
stage_artifacts_path = "#{ENV["DIST_PATH"]}/#{ENV["PLATFORM"]}/#{build_target}"
derived_data_path stage_build_path derived_data_path stage_build_path
buildlog_path stage_build_path buildlog_path stage_build_path

View File

@ -1,8 +1,8 @@
type "development" # The default type, can be: appstore, adhoc, enterprise or development type "development" # The default type, can be: appstore, adhoc, enterprise or development
app_identifier [ app_identifier [
"com.algoritmico.#{ENV['BUNDLE_CONTEXT']}.Passepartout", "com.algoritmico.ios.Passepartout",
"com.algoritmico.#{ENV['BUNDLE_CONTEXT']}.Passepartout.Tunnel" "com.algoritmico.ios.Passepartout.Tunnel"
] ]
# For all available options run `fastlane match --help` # For all available options run `fastlane match --help`

View File

@ -7,15 +7,13 @@ fi
ci/update-changelog.sh ios ci/update-changelog.sh ios
ci/update-changelog.sh mac ci/update-changelog.sh mac
ci/copy-release-notes.sh ios
ci/copy-release-notes.sh mac
git add Passepartout/App/*/CHANGELOG.md git add Passepartout/App/*/CHANGELOG.md
git add Passepartout/App/*/fastlane/metadata/*/release_notes.txt git add Passepartout/App/*/fastlane/metadata/*/release_notes.txt
git commit -m "Set beta release" git commit -m "Set beta release"
VERSION=`agvtool mvers -terse1` VERSION=`ci/version-number.sh`
BUILD=`agvtool vers -terse` BUILD=`ci/build-number.sh`
# predict build number (add commits count)
HISTORY=`git rev-list --count HEAD`
BUILD=$((BUILD + HISTORY))
git tag "v$VERSION-b$BUILD" git tag "v$VERSION-b$BUILD"

View File

@ -1,6 +0,0 @@
#!/bin/sh
git push && git push github
git push --tags && git push --tags github
git checkout stable && git merge master
git push github
git checkout master