Merge branch 'automate-ci-cd'
This commit is contained in:
commit
af5be8035f
2
.env
2
.env
|
@ -1,6 +1,6 @@
|
|||
PROJECT="Passepartout"
|
||||
APP_NAME="Passepartout"
|
||||
MATCH_READONLY="true"
|
||||
#MATCH_READONLY="true"
|
||||
BUILD_PATH="build"
|
||||
DIST_PATH="dist"
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
MATCH_TYPE="appstore"
|
||||
MATCH_ADDITIONAL_CERT_TYPES="mac_installer_distribution"
|
||||
GYM_EXPORT_METHOD="app-store"
|
||||
GYM_SKIP_PACKAGE_PKG="false"
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
MATCH_GIT_URL=
|
||||
MATCH_PASSWORD=
|
|
@ -1,10 +0,0 @@
|
|||
APPLE_ID=
|
||||
FASTLANE_USERNAME=
|
||||
FASTLANE_PASSWORD=
|
||||
APPCENTER_OWNER_NAME=
|
||||
APPCENTER_API_TOKEN=
|
||||
APPCENTER_DISTRIBUTE_DESTINATIONS=
|
||||
PILOT_GROUPS=
|
||||
PILOT_USERNAME=
|
||||
DELIVER_USERNAME=
|
||||
PROJECT_ROOT=
|
|
@ -0,0 +1,71 @@
|
|||
name: Beta deployment
|
||||
|
||||
on:
|
||||
push:
|
||||
#branches:
|
||||
# - master
|
||||
tags:
|
||||
- 'v*-b*'
|
||||
#tags-ignore:
|
||||
# - 'v*-*'
|
||||
|
||||
env:
|
||||
APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }}
|
||||
APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }}
|
||||
APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY }}
|
||||
FASTLANE_USERNAME: ${{ secrets.FASTLANE_USERNAME }}
|
||||
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 }}
|
||||
DELIVER_USERNAME: ${{ secrets.DELIVER_USERNAME }}
|
||||
PILOT_USERNAME: ${{ secrets.PILOT_USERNAME }}
|
||||
PILOT_GROUPS: ${{ secrets.PILOT_GROUPS }}
|
||||
APPCENTER_OWNER_NAME: ${{ secrets.APPCENTER_OWNER_NAME }}
|
||||
APPCENTER_API_TOKEN: ${{ secrets.APPCENTER_API_TOKEN }}
|
||||
|
||||
jobs:
|
||||
submit_appstore:
|
||||
runs-on: macos-10.15
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0 # for proper build number
|
||||
submodules: true
|
||||
- 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
|
||||
with:
|
||||
xcode-version: latest-stable
|
||||
- name: Cache CocoaPods
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: Pods
|
||||
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pods-
|
||||
- name: Prepare for fastlane match
|
||||
run: |
|
||||
scripts/recognize-match-hostname.sh
|
||||
bundle exec fastlane run create_keychain name:"$MATCH_KEYCHAIN_NAME" password:"$MATCH_KEYCHAIN_PASSWORD"
|
||||
ci/update-certs.sh mac development
|
||||
ci/update-certs.sh ios development
|
||||
- name: Build (macOS)
|
||||
run: ci/beta-archive.sh mac
|
||||
- name: Clean up
|
||||
run: scripts/reset-archive.sh
|
||||
- name: Build (iOS)
|
||||
run: ci/beta-archive.sh ios
|
||||
- name: Send to App Store (macOS)
|
||||
run: ci/store-deploy.sh mac
|
||||
- name: Submit to TestFlight (iOS)
|
||||
run: ci/beta-deploy.sh ios
|
|
@ -20,3 +20,5 @@ l10n
|
|||
passepartout-translations.zip
|
||||
default.profraw
|
||||
asc-key.json
|
||||
.bundle
|
||||
vendor/
|
||||
|
|
|
@ -17,7 +17,7 @@ GEM
|
|||
artifactory (3.0.15)
|
||||
atomos (0.1.3)
|
||||
aws-eventstream (1.2.0)
|
||||
aws-partitions (1.506.0)
|
||||
aws-partitions (1.508.0)
|
||||
aws-sdk-core (3.121.1)
|
||||
aws-eventstream (~> 1, >= 1.0.2)
|
||||
aws-partitions (~> 1, >= 1.239.0)
|
||||
|
@ -82,7 +82,7 @@ GEM
|
|||
domain_name (0.5.20190701)
|
||||
unf (>= 0.0.5, < 1.0.0)
|
||||
dotenv (2.7.6)
|
||||
emoji_regex (3.2.2)
|
||||
emoji_regex (3.2.3)
|
||||
escape (0.0.4)
|
||||
ethon (0.14.0)
|
||||
ffi (>= 1.15.0)
|
||||
|
@ -187,13 +187,13 @@ GEM
|
|||
google-cloud-core (~> 1.6)
|
||||
googleauth (>= 0.16.2, < 2.a)
|
||||
mini_mime (~> 1.0)
|
||||
googleauth (0.17.1)
|
||||
googleauth (1.0.0)
|
||||
faraday (>= 0.17.3, < 2.0)
|
||||
jwt (>= 1.4, < 3.0)
|
||||
memoist (~> 0.16)
|
||||
multi_json (~> 1.11)
|
||||
os (>= 0.9, < 2.0)
|
||||
signet (~> 0.15)
|
||||
signet (>= 0.16, < 2.a)
|
||||
highline (2.0.3)
|
||||
http-cookie (1.0.4)
|
||||
domain_name (~> 0.5)
|
||||
|
|
|
@ -2258,7 +2258,7 @@
|
|||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1000;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = Passepartout/Core/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
|
@ -2290,7 +2290,7 @@
|
|||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1000;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = Passepartout/Core/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
|
@ -2430,7 +2430,7 @@
|
|||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1000;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = Passepartout/Core/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
|
@ -2462,7 +2462,7 @@
|
|||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1000;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = Passepartout/Core/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
|
@ -2518,7 +2518,7 @@
|
|||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
CURRENT_PROJECT_VERSION = 980;
|
||||
CURRENT_PROJECT_VERSION = 1000;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_BITCODE = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
|
@ -2585,7 +2585,7 @@
|
|||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
CURRENT_PROJECT_VERSION = 980;
|
||||
CURRENT_PROJECT_VERSION = 1000;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_BITCODE = NO;
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 836f52ea36a399e4727da08374b07032e6121521
|
||||
Subproject commit bd02f983863fbb7964766cb632762a2412082e3c
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
VERSION=$1
|
||||
|
||||
if [[ -z $VERSION ]]; then
|
||||
echo "Version number required"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CHANGELOG_GLOB="Passepartout/App/*/CHANGELOG.md"
|
||||
|
||||
ci/set-version.sh $VERSION
|
||||
sed -i '' -E "s/(^and this project adheres.*$)/\1\n\n## Unreleased/" $CHANGELOG_GLOB
|
||||
|
||||
git add *.plist $CHANGELOG_GLOB
|
||||
git commit -m "Bump version"
|
|
@ -1,7 +0,0 @@
|
|||
#!/bin/sh
|
||||
rm -rf build dist
|
||||
scripts/commit-beta.sh
|
||||
ci/dev-archive.sh mac || { echo "Failed to build macOS" ; exit 1 ; }
|
||||
scripts/reset-archive.sh
|
||||
ci/dev-archive.sh ios || { echo "Failed to build iOS" ; exit 1 ; }
|
||||
#scripts/reset-archive.sh
|
|
@ -1,7 +0,0 @@
|
|||
#!/bin/sh
|
||||
rm -rf build dist
|
||||
scripts/commit-beta.sh
|
||||
ci/beta-archive.sh mac || { echo "Failed to build macOS" ; exit 1 ; }
|
||||
scripts/reset-archive.sh
|
||||
ci/beta-archive.sh ios || { echo "Failed to build iOS" ; exit 1 ; }
|
||||
#scripts/reset-archive.sh
|
|
@ -1,4 +1,21 @@
|
|||
#!/bin/sh
|
||||
CURRENT_BRANCH=`git branch --show-current`
|
||||
if [[ $CURRENT_BRANCH != "master" ]]; then
|
||||
echo "Not on master branch"
|
||||
exit
|
||||
fi
|
||||
|
||||
ci/update-changelog.sh ios
|
||||
ci/update-changelog.sh mac
|
||||
git add Passepartout/App/*/CHANGELOG.md
|
||||
git add Passepartout/App/*/fastlane/metadata/*/release_notes.txt
|
||||
git commit -m "Set beta release"
|
||||
|
||||
VERSION=`agvtool mvers -terse1`
|
||||
BUILD=`agvtool vers -terse`
|
||||
|
||||
# predict build number (add commits count)
|
||||
HISTORY=`git rev-list --count HEAD`
|
||||
BUILD=$((BUILD + HISTORY))
|
||||
|
||||
git tag "v$VERSION-b$BUILD"
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
CURRENT_BRANCH=`git branch --show-current`
|
||||
if [[ $CURRENT_BRANCH != "master" ]]; then
|
||||
echo "Not on master branch"
|
||||
exit
|
||||
fi
|
||||
|
||||
ci/update-asc-metadata.sh mac
|
||||
ci/update-asc-metadata.sh ios
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
HOSTNAME=`echo $MATCH_GIT_URL | sed -E "s/^.*@(.*):.*$/\1/"`
|
||||
grep -q $HOSTNAME ~/.ssh/known_hosts
|
||||
if [[ $? != 0 ]]; then
|
||||
ssh-keyscan $HOSTNAME 2>/dev/null >>~/.ssh/known_hosts
|
||||
fi
|
|
@ -1,9 +0,0 @@
|
|||
#!/bin/sh
|
||||
ci/dev-deploy.sh mac || { echo "Failed to deploy macOS" ; exit 1 ; }
|
||||
ci/dev-deploy.sh ios || { echo "Failed to deploy iOS" ; exit 1 ; }
|
||||
|
||||
VERSION=`agvtool mvers -terse1`
|
||||
BUILD=`agvtool vers -terse`
|
||||
git tag "v$VERSION-a$BUILD"
|
||||
|
||||
scripts/reset-archive.sh
|
|
@ -1,9 +0,0 @@
|
|||
#!/bin/sh
|
||||
ci/store-deploy.sh mac || { echo "Failed to deploy macOS" ; exit 1 ; }
|
||||
ci/beta-deploy.sh ios || { echo "Failed to deploy iOS" ; exit 1 ; }
|
||||
|
||||
VERSION=`agvtool mvers -terse1`
|
||||
BUILD=`agvtool vers -terse`
|
||||
git tag "v$VERSION-b$BUILD"
|
||||
|
||||
scripts/reset-archive.sh
|
Loading…
Reference in New Issue