-
Notifications
You must be signed in to change notification settings - Fork 466
230 lines (184 loc) · 5.89 KB
/
release.yml
File metadata and controls
230 lines (184 loc) · 5.89 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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
name: release
on:
release:
types: [published]
workflow_dispatch:
inputs:
release-pypi:
required: true
type: boolean
description: "if true a release is made on PyPI"
jobs:
test:
uses: ./.github/workflows/test.yml
secrets: inherit
perf-test:
uses: ./.github/workflows/perf-test.yml
secrets: inherit
build:
needs: test
uses: ./.github/workflows/build.yml
docs:
needs: test
uses: ./.github/workflows/deploy_docs.yml
secrets: inherit
release-core:
needs: [ build ]
runs-on: ubuntu-latest
if: |
( github.event.inputs.release-pypi == 'true' && startsWith(github.ref_name, 'fairchem_core-') ) || startsWith(github.event.release.tag_name, 'fairchem_core-')
environment:
name: pypi
url: https://pypi.org/p/fairchem-core/
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- uses: actions/download-artifact@v6
with:
name: dist-core
path: dist-core
- uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist-core/
skip-existing: true
verbose: true
release-data-oc:
needs: [ build ]
runs-on: ubuntu-latest
if: |
( github.event.inputs.release-pypi == 'true' && startsWith(github.ref_name, 'fairchem_data_oc-') ) || startsWith(github.event.release.tag_name, 'fairchem_data_oc-')
environment:
name: pypi
url: https://pypi.org/p/fairchem-data-oc/
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v6
with:
name: dist-data-oc
path: dist-data-oc
- uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
packages-dir: dist-data-oc/
skip-existing: true
release-demo-ocpapi:
needs: [ build ]
runs-on: ubuntu-latest
if: |
( github.event.inputs.release-pypi == 'true' && startsWith(github.ref_name, 'fairchem_demo_ocpapi-') ) || startsWith(github.event.release.tag_name, 'fairchem_demo_ocpapi-')
environment:
name: pypi
url: https://pypi.org/p/fairchem-demo-ocpapi/
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v6
with:
name: dist-demo-ocpapi
path: dist-demo-ocpapi
- uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
packages-dir: dist-demo-ocpapi/
skip-existing: true
release-applications-cattsunami:
needs: [ build ]
runs-on: ubuntu-latest
if: |
( github.event.inputs.release-pypi == 'true' && startsWith(github.ref_name, 'fairchem_applications_cattsunami-') ) || startsWith(github.event.release.tag_name, 'fairchem_applications_cattsunami-')
environment:
name: pypi
url: https://pypi.org/p/fairchem-applications-cattsunami/
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v6
with:
name: dist-applications-cattsunami
path: dist-applications-cattsunami
- uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
packages-dir: dist-applications-cattsunami/
skip-existing: true
release-data-omol:
needs: [ build ]
runs-on: ubuntu-latest
if: |
( github.event.inputs.release-pypi == 'true' && startsWith(github.ref_name, 'fairchem_data_omol-') ) || startsWith(github.event.release.tag_name, 'fairchem_data_omol-')
environment:
name: pypi
url: https://pypi.org/p/fairchem-data-omol/
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v6
with:
name: dist-data-omol
path: dist-data-omol
- uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
packages-dir: dist-data-omol/
skip-existing: true
release-lammps:
needs: [ build ]
runs-on: ubuntu-latest
if: |
( github.event.inputs.release-pypi == 'true' && startsWith(github.ref_name, 'fairchem_lammps-') ) || startsWith(github.event.release.tag_name, 'fairchem_lammps-')
environment:
name: pypi
url: https://pypi.org/p/fairchem-lammps/
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- uses: actions/download-artifact@v6
with:
name: dist-lammps
path: dist-lammps
- uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist-lammps/
skip-existing: true
verbose: true
release-data-omat:
needs: [ build ]
runs-on: ubuntu-latest
if: |
( github.event.inputs.release-pypi == 'true' && startsWith(github.ref_name, 'fairchem_data_omat-') ) || startsWith(github.event.release.tag_name, 'fairchem_data_omat-')
environment:
name: pypi
url: https://pypi.org/p/fairchem-data-omat/
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v6
with:
name: dist-data-omat
path: dist-data-omat
- uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
packages-dir: dist-data-omat/
skip-existing: true
release-data-omc:
needs: [ build ]
runs-on: ubuntu-latest
if: |
( github.event.inputs.release-pypi == 'true' && startsWith(github.ref_name, 'fairchem_data_omc-') ) || startsWith(github.event.release.tag_name, 'fairchem_data_omc-')
environment:
name: pypi
url: https://pypi.org/p/fairchem-data-omc/
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v6
with:
name: dist-data-omc
path: dist-data-omc
- uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
packages-dir: dist-data-omc/
skip-existing: true