generated from element-hq/.github
-
Notifications
You must be signed in to change notification settings - Fork 115
74 lines (59 loc) · 2.37 KB
/
release-alpha.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
name: Alpha release
on:
pull_request:
workflow_dispatch:
jobs:
build:
# Don't run for forks as secrets are unavailable.
if: |
github.event.pull_request.head.repo.full_name == github.repository &&
(github.event_name == 'push' ||
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'Trigger-PR-Build')))
name: Release
runs-on: macos-12
concurrency:
# Only allow a single run of this workflow on each branch, automatically cancelling older runs.
group: alpha-${{ github.head_ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
- name: Cache Ruby gems
uses: actions/cache@v3
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Brew bundle
run:
brew bundle
- name: SwiftFormat
run:
swiftformat --lint .
- name: Bundle install
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Import signing certificate
uses: apple-actions/import-codesign-certs@v1
with:
p12-file-base64: ${{ secrets.ALPHA_CERTIFICATES_P12 }}
p12-password: ${{ secrets.ALPHA_CERTIFICATES_P12_PASSWORD }}
- name: Build alpha
run: bundle exec fastlane alpha
env:
APPSTORECONNECT_KEY_ID: ${{ secrets.APPSTORECONNECT_KEY_ID }}
APPSTORECONNECT_KEY_ISSUER_ID: ${{ secrets.APPSTORECONNECT_KEY_ISSUER_ID }}
APPSTORECONNECT_KEY_CONTENT: ${{ secrets.APPSTORECONNECT_KEY_CONTENT }}
DIAWI_API_TOKEN: ${{ secrets.DIAWI_API_TOKEN }}
GITHUB_PR_NUMBER: ${{ github.event.number }}
- name: Add release notes and Diawi info
uses: NejcZdovc/comment-pr@v1
with:
message: |
:iphone: Scan the QR code below to install the build for this PR.
:lock: This build is for internal testing purpose. Only devices listed in the ad-hoc provisioning profile can install Element Alpha.
![QR code](${{ env.DIAWI_QR_CODE_LINK }})
If you can't scan the QR code you can install the build via this link: ${{ env.DIAWI_FILE_LINK }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}