-
Notifications
You must be signed in to change notification settings - Fork 0
123 lines (104 loc) · 3.69 KB
/
ci-fastlane-release_app_store.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# Leka - iOS Monorepo
# Copyright APF France handicap
# SPDX-License-Identifier: Apache-2.0
name: Fastlane - Release to App Store
on:
pull_request:
types: [labeled]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
APP_STORE_CONNECT_API_KEY_CONTENT_RELEASE_APP_STORE: ${{ secrets. APP_STORE_CONNECT_API_KEY_CONTENT_RELEASE_APP_STORE }}
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets. APP_STORE_CONNECT_ISSUER_ID }}
APP_STORE_CONNECT_API_KEY_ID_RELEASE_APP_STORE: ${{ secrets. APP_STORE_CONNECT_API_KEY_ID_RELEASE_APP_STORE }}
FASTLANE_KEYCHAIN_PASSWORD: ${{ secrets.FASTLANE_KEYCHAIN_PASSWORD }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
jobs:
release_app_store:
if: github.event_name == 'pull_request' && contains(github.event.label.name, 'fastlane:deliver')
name: fastlane upload_to_app_store
runs-on: [self-hosted, iOS, release]
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
FASTLANE_SKIP_UPDATE_CHECK: 1
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
- name: Checkout base, head branches
run: |
git checkout ${{ env.BASE_REF }}
git checkout ${{ env.HEAD_REF }}
env:
BASE_REF: ${{ github.event.pull_request.base.ref }}
HEAD_REF: ${{ github.head_ref }}
- name: Set up mise
uses: jdx/mise-action@v2
with:
version: 2024.12.4
install: true
cache: true
- uses: actions/cache@v4
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ runner.name }}-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-${{ runner.name }}-
${{ runner.os }}-gems-
- name: bundle install
run: |
bundle config path vendor/bundle
bundle install
- name: tuist install
run: |
tuist install
- name: fastlane helloworld
run: |
bundle exec fastlane helloworld
- name: fastlane sync_certificates
run: |
bundle exec fastlane sync_certificates release:true --verbose
- name: fastlane release LekaApp
if: contains(github.event.label.name, 'LekaApp')
run: |
bundle exec fastlane release target:LekaApp --verbose
- name: fastlane release LekaUpdater
if: contains(github.event.label.name, 'LekaUpdater')
run: |
bundle exec fastlane release target:LekaUpdater --verbose
- name: Post Github comment
if: ${{ success() }}
uses: marocchino/sticky-pull-request-comment@v2
with:
hide_and_recreate: true
hide_classify: "OUTDATED"
header: release
message: |
${{ env.CHANGELOG_FOR_GITHUB }}
- name: Post to a Slack channel
id: slack
uses: slackapi/[email protected]
with:
channel-id: "C3SHVTYNP,C041YEWNVJS"
slack-message: ${{ env.CHANGELOG_FOR_SLACK }}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
- name: remove label
if: always()
uses: actions/github-script@v6
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const { LABEL_NAME } = process.env
github.rest.issues.removeLabel({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
name: LABEL_NAME
})
env:
LABEL_NAME: ${{ github.event.label.name }}