Skip to content

Commit a0205e2

Browse files
committed
Split build flow for two dists
1 parent 0eb4e0e commit a0205e2

File tree

2 files changed

+67
-12
lines changed

2 files changed

+67
-12
lines changed

.github/workflows/build.yml

+66-11
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ on:
1212
- published
1313

1414
jobs:
15-
build:
16-
name: Build
15+
build-peakrdl-cli:
16+
name: Build peakrdl-cli
1717
runs-on: ubuntu-latest
1818
steps:
1919
- uses: actions/checkout@v3
@@ -30,18 +30,44 @@ jobs:
3030
- name: Build
3131
run: |
3232
python -m build peakrdl-cli -o dist/
33+
34+
- uses: actions/upload-artifact@v4
35+
with:
36+
name: dist-peakrdl-cli
37+
path: |
38+
dist/*.tar.gz
39+
dist/*.whl
40+
41+
build-peakrdl:
42+
name: Build peakrdl
43+
runs-on: ubuntu-latest
44+
steps:
45+
- uses: actions/checkout@v3
46+
47+
- uses: actions/setup-python@v4
48+
name: Install Python
49+
with:
50+
python-version: "3.11"
51+
52+
- name: Install dependencies
53+
run: |
54+
python -m pip install build
55+
56+
- name: Build
57+
run: |
3358
python -m build peakrdl -o dist/
3459
3560
- uses: actions/upload-artifact@v4
3661
with:
37-
name: dist
62+
name: dist-peakrdl
3863
path: |
3964
dist/*.tar.gz
4065
dist/*.whl
4166
#-------------------------------------------------------------------------------
4267
test:
4368
needs:
44-
- build
69+
- build-peakrdl-cli
70+
- build-peakrdl
4571
strategy:
4672
matrix:
4773
python-version:
@@ -77,7 +103,12 @@ jobs:
77103

78104
- uses: actions/download-artifact@v4
79105
with:
80-
name: dist
106+
name: dist-peakrdl
107+
path: dist
108+
109+
- uses: actions/download-artifact@v4
110+
with:
111+
name: dist-peakrdl-cli
81112
path: dist
82113

83114
- name: Install dependencies
@@ -122,7 +153,7 @@ jobs:
122153
#-------------------------------------------------------------------------------
123154
lint:
124155
needs:
125-
- build
156+
- build-peakrdl-cli
126157
runs-on: ubuntu-latest
127158
steps:
128159
- uses: actions/checkout@v3
@@ -133,7 +164,7 @@ jobs:
133164

134165
- uses: actions/download-artifact@v4
135166
with:
136-
name: dist
167+
name: dist-peakrdl-cli
137168
path: dist
138169

139170
- name: Install dependencies
@@ -151,7 +182,7 @@ jobs:
151182
#-------------------------------------------------------------------------------
152183
mypy:
153184
needs:
154-
- build
185+
- build-peakrdl-cli
155186
runs-on: ubuntu-latest
156187
steps:
157188
- uses: actions/checkout@v3
@@ -162,7 +193,7 @@ jobs:
162193

163194
- uses: actions/download-artifact@v4
164195
with:
165-
name: dist
196+
name: dist-peakrdl-cli
166197
path: dist
167198

168199
- name: Install dependencies
@@ -178,11 +209,35 @@ jobs:
178209
mypy --config-file test/mypy.ini peakrdl-cli/src/peakrdl
179210
180211
#-------------------------------------------------------------------------------
181-
deploy:
212+
deploy-peakrdl:
213+
needs:
214+
- test
215+
- lint
216+
- mypy
217+
- build-peakrdl
218+
219+
runs-on: ubuntu-latest
220+
environment: release
221+
permissions:
222+
id-token: write
223+
224+
# Only publish when a GitHub Release is created.
225+
if: github.event_name == 'release'
226+
steps:
227+
- uses: actions/download-artifact@v4
228+
with:
229+
name: dist-peakrdl
230+
path: dist
231+
232+
- uses: pypa/gh-action-pypi-publish@release/v1
233+
234+
235+
deploy-peakrdl-cli:
182236
needs:
183237
- test
184238
- lint
185239
- mypy
240+
- build-peakrdl-cli
186241

187242
runs-on: ubuntu-latest
188243
environment: release
@@ -194,7 +249,7 @@ jobs:
194249
steps:
195250
- uses: actions/download-artifact@v4
196251
with:
197-
name: dist
252+
name: dist-peakrdl-cli
198253
path: dist
199254

200255
- uses: pypa/gh-action-pypi-publish@release/v1

peakrdl-cli/src/peakrdl/__about__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.2.1"
1+
__version__ = "1.2.2"

0 commit comments

Comments
 (0)