-
Notifications
You must be signed in to change notification settings - Fork 204
193 lines (173 loc) · 5.32 KB
/
Copy pathrelease.yml
File metadata and controls
193 lines (173 loc) · 5.32 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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
name: Release
on:
workflow_dispatch:
inputs:
type:
description: 'Release type'
required: true
type: choice
options:
- dry-run
- beta
- production
concurrency:
group: release
cancel-in-progress: true
env:
ARTIFACTORY_URL: ${{ vars.ARTIFACTORY_URL }}
jobs:
ci:
name: Lint + Build + Test
runs-on: ubuntu-latest-large
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Artifactory OIDC Auth
uses: ./.github/actions/artifactory-oidc
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
- run: corepack enable
- name: Install dependencies
run: |
set -o pipefail
yarn install --immutable 2>&1 | tee /tmp/yarn-install.log
- name: Curation Audit (on install failure)
if: failure()
uses: ./.github/actions/curation-audit
with:
install-log: /tmp/yarn-install.log
- name: Lint (eslint)
run: yarn lint
- name: Install treefmt + shfmt
run: |
curl -fsSL https://github.com/numtide/treefmt/releases/download/v2.5.0/treefmt_2.5.0_linux_amd64.tar.gz | sudo tar -xz -C /usr/local/bin treefmt
sudo curl -fsSL -o /usr/local/bin/shfmt https://github.com/mvdan/sh/releases/download/v3.13.1/shfmt_v3.13.1_linux_amd64
sudo chmod +x /usr/local/bin/shfmt
- name: Lint (formatting)
run: yarn format:check
- name: Build
run: yarn build
- name: Typecheck
run: yarn typecheck
- name: Test
run: yarn test
release-dryrun:
name: Release (dry-run)
if: inputs.type == 'dry-run'
needs: [ci]
runs-on: ubuntu-latest-large
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
fetch-depth: 0
token: ${{ github.token }}
- name: Artifactory OIDC Auth
uses: ./.github/actions/artifactory-oidc
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
- run: corepack enable
- name: Install dependencies
run: |
set -o pipefail
yarn install --immutable 2>&1 | tee /tmp/yarn-install.log
- name: Curation Audit (on install failure)
if: failure()
uses: ./.github/actions/curation-audit
with:
install-log: /tmp/yarn-install.log
- name: Release (dry-run)
run: |
yarn build
yarn multi-semantic-release --dry-run
env:
GH_TOKEN: ${{ github.token }}
release-beta:
name: Release (beta)
if: inputs.type == 'beta'
needs: [ci]
runs-on: ubuntu-latest-large
environment: Publish-Beta
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
fetch-depth: 0
token: ${{ github.token }}
- name: Artifactory OIDC Auth
uses: ./.github/actions/artifactory-oidc
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
- run: corepack enable
- name: Install dependencies
run: |
set -o pipefail
yarn install --immutable 2>&1 | tee /tmp/yarn-install.log
- name: Curation Audit (on install failure)
if: failure()
uses: ./.github/actions/curation-audit
with:
install-log: /tmp/yarn-install.log
- name: Release (beta)
run: |
yarn build
yarn release
env:
GH_TOKEN: ${{ github.token }}
GITHUB_REF: refs/heads/${{ github.ref_name }}
NPM_CONFIG_IGNORE_SCRIPTS: 'true'
release-production:
name: Release (production)
if: inputs.type == 'production'
needs: [ci]
runs-on: ubuntu-latest-large
environment: Publish
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
fetch-depth: 0
token: ${{ github.token }}
- name: Artifactory OIDC Auth
uses: ./.github/actions/artifactory-oidc
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
- run: corepack enable
- name: Install dependencies
run: |
set -o pipefail
yarn install --immutable 2>&1 | tee /tmp/yarn-install.log
- name: Curation Audit (on install failure)
if: failure()
uses: ./.github/actions/curation-audit
with:
install-log: /tmp/yarn-install.log
- name: Release (production)
run: |
yarn build
yarn release
env:
GH_TOKEN: ${{ github.token }}
NPM_CONFIG_IGNORE_SCRIPTS: 'true'
- name: Update Apps
run: |
yarn install --no-immutable
yarn --cwd examples/AnalyticsReactNativeExample install --no-immutable