-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
171 lines (151 loc) · 5.3 KB
/
nightly-build.yml
File metadata and controls
171 lines (151 loc) · 5.3 KB
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
name: Nightly Build
# Triggered by every push to chore/temp-nightly (which nightly-temp-branch-sync.yml
# force-pushes daily at 4 AM UTC to match main).
# Temporarily now this is pointing to test/temp-nightly instead of chore/temp-nightly.
#
# [skip ci] commits (e.g. version bumps pushed via update-latest-build-version.yml)
# are automatically skipped by GitHub Actions, so this workflow will NOT
# double-trigger on those commits.
on:
push:
branches:
- test/temp-nightly
workflow_dispatch:
# contents: write required by build.yml update-build-version job (version bump commit push)
permissions:
contents: write
id-token: write
jobs:
bump-version:
name: Bump build version
uses: ./.github/workflows/update-latest-build-version.yml
permissions:
contents: write
id-token: write
with:
base-branch: ${{ github.ref_name }}
secrets: inherit
build-exp:
name: Nightly exp build (main-exp)
needs: [bump-version]
uses: ./.github/workflows/build.yml
with:
build_name: main-exp
platform: both
skip_version_bump: true
ref: ${{ needs.bump-version.outputs.commit-hash }}
secrets: inherit
build-rc:
name: Nightly RC build (main-rc)
needs: [bump-version]
uses: ./.github/workflows/build.yml
with:
build_name: main-rc
platform: both
skip_version_bump: true
ref: ${{ needs.bump-version.outputs.commit-hash }}
secrets: inherit
upload-exp-testflight:
name: Upload exp to TestFlight
needs: [build-exp]
runs-on: ghcr.io/cirruslabs/macos-runner:sequoia-xl
environment: apple
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Ruby (iOS)
uses: ruby/setup-ruby@44511735964dcb71245e7e55f72539531f7bc0eb #v1
with:
ruby-version: '3.2.9'
working-directory: ios
bundler-cache: true
- name: Download iOS build artifact
uses: actions/download-artifact@v4
with:
name: ios-main-exp
- name: Find IPA path
id: ipa
run: |
IPA=$(find . -name '*.ipa' -type f | head -1)
if [ -z "$IPA" ]; then
echo "::error::No .ipa file found in artifact"
exit 1
fi
case "$IPA" in /*) ABS="$IPA" ;; *) ABS="$PWD/$IPA" ;; esac
echo "path=$ABS" >> "$GITHUB_OUTPUT"
- name: Setup App Store Connect API Key
run: |
bash scripts/setup-app-store-connect-api-key.sh \
"$APP_STORE_CONNECT_API_KEY_ISSUER_ID" \
"$APP_STORE_CONNECT_API_KEY_KEY_ID" \
"$APP_STORE_CONNECT_API_KEY_KEY_CONTENT"
env:
APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }}
APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }}
APP_STORE_CONNECT_API_KEY_KEY_CONTENT: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_CONTENT }}
- name: Upload to TestFlight
run: |
bash scripts/upload-to-testflight.sh \
"github_actions_main-exp" \
"${{ github.ref_name }}" \
"${{ steps.ipa.outputs.path }}" \
"MetaMask BETA & Release Candidates"
- name: Cleanup API Key
if: always()
run: |
rm -f ios/AuthKey.p8
echo "🧹 Cleaned up API key file"
upload-rc-testflight:
name: Upload RC to TestFlight
needs: [build-rc]
runs-on: ghcr.io/cirruslabs/macos-runner:sequoia-xl
environment: apple
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Ruby (iOS)
uses: ruby/setup-ruby@44511735964dcb71245e7e55f72539531f7bc0eb #v1
with:
ruby-version: '3.2.9'
working-directory: ios
bundler-cache: true
- name: Download iOS build artifact
uses: actions/download-artifact@v4
with:
name: ios-main-rc
- name: Find IPA path
id: ipa
run: |
IPA=$(find . -name '*.ipa' -type f | head -1)
if [ -z "$IPA" ]; then
echo "::error::No .ipa file found in artifact"
exit 1
fi
case "$IPA" in /*) ABS="$IPA" ;; *) ABS="$PWD/$IPA" ;; esac
echo "path=$ABS" >> "$GITHUB_OUTPUT"
- name: Setup App Store Connect API Key
run: |
bash scripts/setup-app-store-connect-api-key.sh \
"$APP_STORE_CONNECT_API_KEY_ISSUER_ID" \
"$APP_STORE_CONNECT_API_KEY_KEY_ID" \
"$APP_STORE_CONNECT_API_KEY_KEY_CONTENT"
env:
APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }}
APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }}
APP_STORE_CONNECT_API_KEY_KEY_CONTENT: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_CONTENT }}
- name: Upload to TestFlight
run: |
bash scripts/upload-to-testflight.sh \
"github_actions_main-rc" \
"${{ github.ref_name }}" \
"${{ steps.ipa.outputs.path }}" \
"MetaMask BETA & Release Candidates"
- name: Cleanup API Key
if: always()
run: |
rm -f ios/AuthKey.p8
echo "🧹 Cleaned up API key file"