1
- name : Build and Publish
1
+ name : Python Build and Publish
2
2
3
3
on :
4
4
push :
5
5
pull_request :
6
6
7
7
jobs :
8
- linux- build :
8
+ build-wheels :
9
9
runs-on : ubuntu-latest
10
10
strategy :
11
11
matrix :
@@ -35,48 +35,53 @@ jobs:
35
35
with :
36
36
name : wheels_${{ matrix.manylinux }}_${{ matrix.target }}
37
37
path : dist
38
+
39
+ build-sdist :
40
+ name : Build Source Distribution (sdist)
41
+ runs-on : ubuntu-latest
42
+ steps :
43
+ - name : Checkout Code
44
+ uses : actions/checkout@v3
45
+
46
+ - name : Set up Python
47
+ uses : actions/setup-python@v4
48
+ with :
49
+ python-version : " 3.10"
50
+
51
+ - name : Install Maturin
52
+ run : pip install --upgrade maturin
53
+
54
+ - name : Build sdist
55
+ run : maturin sdist --out dist
56
+
57
+ - name : Upload sdist Artifact
58
+ uses : actions/upload-artifact@v4
59
+ with :
60
+ name : sdist
61
+ path : dist
38
62
39
63
pypi-release :
40
64
name : Publish to Pypi
41
65
runs-on : ubuntu-latest
42
66
environment : pypi-publish
43
- if : startsWith(github.ref, 'refs/tags/')
44
- needs : [ linux- build ]
67
+ # if: startsWith(github.ref, 'refs/tags/')
68
+ needs : [ build-wheels, build-sdist ]
45
69
steps :
46
70
- name : Download Build Artifacts
47
71
uses : actions/download-artifact@v4
48
72
with :
49
- path : wheels
73
+ path : dist
50
74
51
75
- name : Python Setup
52
76
uses : actions/setup-python@v4
53
77
with :
54
78
python-version : ' 3.10'
79
+
55
80
56
- - name : Publish to PyPI
57
- env :
58
- TWINE_USERNAME : __token__
59
- TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
60
- run : |
61
- pip install --upgrade twine
62
- twine upload --skip-existing wheels/**/*.whl
63
-
64
- cratesio-release :
65
- name : Publish to Crates.io
66
- runs-on : ubuntu-latest
67
- environment : cratesio-publish
68
- if : startsWith(github.ref, 'refs/tags/')
69
- steps :
70
- - name : Checkout Code
71
- uses : actions/checkout@v3
72
-
73
- - name : Set up Rust
74
- uses : actions-rs/toolchain@v1
75
- with :
76
- toolchain : stable
77
- override : true
78
-
79
- - name : Publish to crates.io
80
- env :
81
- CARGO_REGISTRY_TOKEN : ${{ secrets.CARGO_REGISTRY_TOKEN }}
82
- run : cargo publish
81
+ # - name: Publish to PyPI
82
+ # env:
83
+ # TWINE_USERNAME: __token__
84
+ # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
85
+ # run: |
86
+ # pip install --upgrade twine
87
+ # twine upload --skip-existing dist/**/*.whl dist/**/*.tar.gz
0 commit comments