-
Notifications
You must be signed in to change notification settings - Fork 194
46 lines (44 loc) 路 1.64 KB
/
publish-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: "Publish new release"
on:
pull_request:
branches:
- main
types:
- closed
jobs:
release:
name: Publish new release
runs-on: macos-11
if: github.event.pull_request.merged == true # only merged pull requests must trigger this job
steps:
- name: Install Bot SSH Key
uses: webfactory/ssh-agent@v0.4.1
with:
ssh-private-key: ${{ secrets.BOT_SSH_PRIVATE_KEY }}
- uses: actions/checkout@v1
- name: "Set build image var"
run: echo "ImageVersion=$ImageVersion" >> $GITHUB_ENV
- name: Cache RubyGems
uses: actions/cache@v2
id: rubygem-cache
with:
path: vendor/bundle
key: ${{ runner.os }}-${{ env.ImageVersion }}-gem-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: ${{ runner.os }}-${{ env.ImageVersion }}-gem-
- name: Cache Mint
uses: actions/cache@v2
id: mint-cache
with:
path: /usr/local/lib/mint
key: ${{ runner.os }}-mint-${{ hashFiles('./Mintfile') }}
restore-keys: ${{ runner.os }}-mint-
- name: Extract version from branch name (for release branches)
if: startsWith(github.event.pull_request.head.ref, 'release/')
run: |
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
VERSION=${BRANCH_NAME#release/}
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
- uses: ./.github/actions/bootstrap
- name: "Starting on the Fastlane Publish Release"
if: startsWith(github.event.pull_request.head.ref, 'release/')
run: bundle exec fastlane publish_release version:${{ env.RELEASE_VERSION }}