Skip to content

Commit 933bc33

Browse files
committed
always build the project
1 parent fff3c0a commit 933bc33

File tree

1 file changed

+29
-22
lines changed

1 file changed

+29
-22
lines changed

.github/workflows/check.yml

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ jobs:
200200
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
201201
runs-on: ubuntu-latest
202202
steps:
203-
- run: echo "Hello, World!"
203+
- run: echo "Registered a push event on main"
204204

205205
github-pages:
206206
name: GitHub Pages
@@ -253,7 +253,7 @@ jobs:
253253
runs-on: ubuntu-latest
254254
outputs:
255255
version: ${{ steps.version.outputs.version }}
256-
latest_version: ${{ steps.version.outputs.latest_version }}
256+
latest_version: ${{ steps.latest_version.outputs.latest_version }}
257257
steps:
258258
- name: Checkout repository
259259
uses: actions/checkout@v4
@@ -276,21 +276,9 @@ jobs:
276276
echo -n "latest_version=" >> $GITHUB_OUTPUT
277277
git describe --tags --abbrev=0 >> $GITHUB_OUTPUT
278278
279-
build_release:
280-
name: Build release
279+
build:
280+
name: Build
281281
runs-on: ubuntu-latest
282-
if: needs.get_version.outputs.version != needs.get_version.outputs.latest_version
283-
needs:
284-
- fix_stupid_mistakes
285-
- test
286-
- test-rustpython
287-
- mypy
288-
- pytype
289-
- flake8
290-
- pylint
291-
- bandit
292-
- is_on_main
293-
- get_version
294282
steps:
295283
- name: Checkout repository
296284
uses: actions/checkout@v4
@@ -305,14 +293,33 @@ jobs:
305293
- name: Upload as build artifact
306294
uses: actions/upload-artifact@v4
307295
with:
308-
name: release_build
296+
name: build
309297
path: dist
310298

299+
release:
300+
name: Release a new version
301+
if: needs.get_version.outputs.version != needs.get_version.outputs.latest_version
302+
runs-on: ubuntu-latest
303+
needs:
304+
- fix_stupid_mistakes
305+
- test
306+
- test-rustpython
307+
- mypy
308+
- pytype
309+
- flake8
310+
- pylint
311+
- bandit
312+
- is_on_main
313+
- get_version
314+
- build
315+
steps:
316+
- run: echo "Preparing to release version ${{ needs.get_version.outputs.version }}"
317+
311318
pypi:
312319
name: Upload to PyPI
313320
runs-on: ubuntu-latest
314321
needs:
315-
- build_release
322+
- release
316323
permissions: {}
317324
steps:
318325
- name: Setup Python
@@ -322,7 +329,7 @@ jobs:
322329
- name: Download artifact
323330
uses: actions/download-artifact@v4
324331
with:
325-
name: release_build
332+
name: build
326333
- name: Install Twine
327334
run: pip install "twine==4.*"
328335
- name: Run Twine
@@ -333,19 +340,19 @@ jobs:
333340
TWINE_USERNAME: __token__
334341
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
335342

336-
release:
343+
github_release:
337344
name: Create release
338345
runs-on: ubuntu-latest
339346
permissions:
340347
contents: write
341348
needs:
342-
- build_release
349+
- release
343350
- get_version
344351
steps:
345352
- name: Download artifact
346353
uses: actions/download-artifact@v4
347354
with:
348-
name: release_build
355+
name: build
349356
- name: Create release
350357
uses: softprops/action-gh-release@v2
351358
with:

0 commit comments

Comments
 (0)