-
Notifications
You must be signed in to change notification settings - Fork 119
61 lines (52 loc) · 1.33 KB
/
release-python.yml
File metadata and controls
61 lines (52 loc) · 1.33 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
name: Release Python
on:
release:
types: [published]
permissions:
id-token: write
env:
PYTHONUTF8: 1
jobs:
wheels:
name: Build Wheels
uses: ./.github/workflows/_wheels.yml
with:
ref: "main"
secrets: inherit
publish_python:
name: Publish Python
needs:
- wheels
# Run even if some build jobs fail (e.g., due to transient network issues)
# This ensures successfully built wheels still get published
if: always()
runs-on: ubuntu-24.04
environment:
name: pypi
url: https://pypi.org/p/numkong
permissions:
id-token: write
steps:
- name: Download Wheels
# unpacks all CIBW artifacts into dist/
# continue-on-error handles cases where some wheel jobs failed
uses: actions/download-artifact@v8
continue-on-error: true
with:
pattern: cibw-*
path: dist
merge-multiple: true
- name: Download Source Distribution
uses: actions/download-artifact@v8
with:
name: sdist
path: dist
- name: List Available Distributions
run: ls -la dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist
verbose: true
print-hash: true
skip-existing: true