-
Notifications
You must be signed in to change notification settings - Fork 21
44 lines (41 loc) · 1.46 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
name: "Publish new release"
on:
pull_request:
branches:
- main
types:
- closed
workflow_dispatch:
inputs:
version:
description: 'Provide release version'
type: string
required: true
jobs:
release:
name: Publish new release
runs-on: macos-13
if: github.event_name == 'workflow_dispatch' || startsWith(github.event.pull_request.head.ref, 'release/')
steps:
- name: Install Bot SSH Key
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.BOT_SSH_PRIVATE_KEY }}
- uses: actions/[email protected]
- name: Extract version from branch name (for release branches)
run: |
if [[ "${{ github.event.inputs.version }}" != "" ]]; then
echo "RELEASE_VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
else
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
VERSION=${BRANCH_NAME#release/}
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
fi
- uses: ./.github/actions/ruby-cache
- name: "Fastlane - Publish Release"
env:
GITHUB_TOKEN: ${{ secrets.CI_BOT_GITHUB_TOKEN }}
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
APPSTORE_API_KEY: ${{ secrets.APPSTORE_API_KEY }}
run: bundle exec fastlane publish_release version:${{ env.RELEASE_VERSION }} --verbose