[ci skip] Split unit testing and beta workflows
- master: test - stable: beta
This commit is contained in:
parent
51821660d2
commit
db075eb291
|
@ -3,12 +3,7 @@ name: Public Beta
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
- 'stable'
|
||||
#tags:
|
||||
# - 'v*-b*'
|
||||
#tags-ignore:
|
||||
# - 'v*-*'
|
||||
|
||||
env:
|
||||
APP_STORE_CONNECT_API_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY }}
|
||||
|
@ -27,21 +22,7 @@ env:
|
|||
CHANGELOG_PREFACE: ${{ secrets.CHANGELOG_PREFACE }}
|
||||
|
||||
jobs:
|
||||
run_tests:
|
||||
if: github.ref != 'refs/heads/stable'
|
||||
runs-on: macos-11
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- name: Prepare build
|
||||
uses: ./.github/actions/prepare-build-app
|
||||
- name: Run tests
|
||||
run: |
|
||||
bundle exec fastlane --env mac,beta test_target
|
||||
build_upload_ios:
|
||||
if: github.ref == 'refs/heads/stable'
|
||||
runs-on: macos-11
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
|
@ -59,7 +40,6 @@ jobs:
|
|||
export PILOT_IPA="dist/ios/Passepartout.ipa"
|
||||
bundle exec fastlane --env ios,beta store_beta
|
||||
build_upload_mac:
|
||||
if: github.ref == 'refs/heads/stable'
|
||||
runs-on: macos-11
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
|
@ -77,7 +57,6 @@ jobs:
|
|||
export PILOT_PKG="dist/mac/Passepartout.pkg"
|
||||
bundle exec fastlane --env mac,beta store_beta
|
||||
release_public_beta:
|
||||
if: github.ref == 'refs/heads/stable'
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build_upload_ios, build_upload_mac]
|
||||
environment:
|
||||
|
@ -105,8 +84,12 @@ jobs:
|
|||
# export PILOT_APP_VERSION=`ci/version-number.sh mac`
|
||||
# export PILOT_BUILD_NUMBER=`ci/build-number.sh mac`
|
||||
# bundle exec fastlane --env mac,beta store_beta
|
||||
- name: Tag release
|
||||
run: |
|
||||
export VERSION=`ci/version-number.sh ios`
|
||||
export BUILD=`ci/version-number.sh ios`
|
||||
git tag "v$VERSION-b$BUILD" && git push --tags
|
||||
submit_for_app_review:
|
||||
if: github.ref == 'refs/heads/stable'
|
||||
runs-on: ubuntu-latest
|
||||
needs: release_public_beta
|
||||
environment:
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
name: Unit Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'stable'
|
||||
|
||||
env:
|
||||
APP_STORE_CONNECT_API_KEY: ${{ secrets.APP_STORE_CONNECT_API_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 }}
|
||||
|
||||
jobs:
|
||||
run_tests:
|
||||
runs-on: macos-11
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- name: Prepare build
|
||||
uses: ./.github/actions/prepare-build-app
|
||||
- name: Run tests
|
||||
run: |
|
||||
bundle exec fastlane --env mac,beta test_target
|
|
@ -10,6 +10,10 @@ DATE=`date "+%Y-%m-%d"`
|
|||
CHANGELOG_GLOB="Passepartout/App/*/CHANGELOG.md"
|
||||
COMMIT_MESSAGE="Set release date"
|
||||
TAG_MESSAGE="Release"
|
||||
TAG_SIGN="--sign"
|
||||
if [[ $1 == "no-sign" ]]; then
|
||||
TAG_SIGN=""
|
||||
fi
|
||||
sed -i '' -E "s/^.*Beta.*$/## $VERSION ($DATE)/" $CHANGELOG_GLOB
|
||||
|
||||
if ! git commit -am "$COMMIT_MESSAGE"; then
|
||||
|
@ -18,7 +22,7 @@ if ! git commit -am "$COMMIT_MESSAGE"; then
|
|||
exit
|
||||
fi
|
||||
|
||||
if ! git tag -as "v$VERSION" -m "$TAG_MESSAGE"; then
|
||||
if ! git tag $TAG_SIGN -a "v$VERSION" -m "$TAG_MESSAGE"; then
|
||||
echo "Failed to tag release"
|
||||
git reset --hard HEAD^
|
||||
exit
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
CURRENT_BRANCH=`git branch --show-current`
|
||||
if [[ $CURRENT_BRANCH != "master" ]]; then
|
||||
echo "Not on master branch"
|
||||
exit
|
||||
fi
|
||||
if !(git checkout stable && git merge master && git push github); then
|
||||
echo "Error while pushing stable"
|
||||
exit
|
||||
fi
|
||||
git checkout master
|
Loading…
Reference in New Issue