9
9
jobs :
10
10
build :
11
11
name : Build on ${{ matrix.platform || matrix.os }} (${{ matrix.target }} - ${{ matrix.manylinux || 'auto' }})
12
+ environment : release
12
13
strategy :
13
14
fail-fast : false
14
15
matrix :
31
32
- os : ubuntu
32
33
platform : linux
33
34
target : aarch64
34
- # mimalloc not supported on manylinux2014 cross-compile container
35
- extra-build-args : --no-default-features
36
35
# musllinux
37
36
- os : ubuntu
38
37
platform : linux
@@ -46,14 +45,10 @@ jobs:
46
45
platform : linux
47
46
target : ppc64le
48
47
interpreter : 3.9 3.10 3.11 3.12 3.13
49
- # mimalloc not supported on manylinux2014 cross-compile container
50
- extra-build-args : --no-default-features
51
48
- os : ubuntu
52
49
platform : linux
53
50
target : s390x
54
51
interpreter : 3.9 3.10 3.11 3.12 3.13
55
- # mimalloc not supported on manylinux2014 cross-compile container
56
- extra-build-args : --no-default-features
57
52
58
53
runs-on : ${{ matrix.os }}-latest
59
54
steps :
@@ -77,13 +72,14 @@ jobs:
77
72
78
73
- run : ${{ matrix.ls || 'ls -lh' }} dist/
79
74
80
- - uses : actions/upload-artifact@v3
75
+ - uses : actions/upload-artifact@v4
81
76
with :
82
- name : dist
77
+ name : dist-${{ matrix.os }}-${{ matrix.target }}-${{ matrix.manylinux }}
83
78
path : dist
84
79
85
80
build_sdist :
86
81
runs-on : ubuntu-latest
82
+ environment : release
87
83
steps :
88
84
- uses : actions/checkout@v3
89
85
- name : Build sdist
@@ -92,30 +88,49 @@ jobs:
92
88
command : sdist
93
89
args : --out dist
94
90
- name : Upload sdist
95
- uses : actions/upload-artifact@v3
91
+ uses : actions/upload-artifact@v4
96
92
with :
97
- name : dist
93
+ name : dist-sdist
94
+ path : dist
95
+
96
+ build_none :
97
+ runs-on : ubuntu-latest
98
+ environment : release
99
+ steps :
100
+ - uses : actions/checkout@v3
101
+ - name : Install and configure Poetry
102
+ uses : snok/install-poetry@v1
103
+ with :
104
+ version : 1.8.5
105
+ - name : Install dependencies
106
+ run : poetry install --only main --only test --only typing --only build
107
+ - name : Run poetry build
108
+ run : poetry build
109
+ - name : Upload sdist
110
+ uses : actions/upload-artifact@v4
111
+ with :
112
+ name : dist-any
98
113
path : dist
99
114
100
115
101
116
Release :
102
- needs : [ build, build_sdist ]
103
- if : success() && startsWith(github.ref, 'refs/tags/')
117
+ needs : [ build, build_sdist, build_none ]
118
+ if : success()
104
119
runs-on : ubuntu-latest
105
-
120
+ environment : release
121
+ permissions :
122
+ id-token : write
123
+ contents : write
106
124
steps :
107
125
- name : Checkout code
108
126
uses : actions/checkout@v2
109
127
110
128
- name : Download artifacts
111
- uses : actions/download-artifact@v3
129
+ uses : actions/download-artifact@v4
112
130
with :
113
- name : dist
131
+ pattern : dist*
114
132
path : dist
115
-
116
- - name : Install Poetry
117
- run : |
118
- curl -fsS https://install.python-poetry.org | python - -y
133
+ merge-multiple : true
119
134
120
135
- name : Update PATH
121
136
run : echo "$HOME/.local/bin" >> $GITHUB_PATH
@@ -134,12 +149,8 @@ jobs:
134
149
uses : ncipollo/release-action@v1
135
150
with :
136
151
artifacts : " dist/*"
137
- token : ${{ secrets.GITHUB_TOKEN }}
138
152
draft : false
139
153
prerelease : steps.check-version.outputs.prerelease == 'true'
140
154
141
- - name : Publish to PyPI
142
- env :
143
- POETRY_PYPI_TOKEN_PYPI : ${{ secrets.PYPI_TOKEN }}
144
- run : |
145
- poetry publish
155
+ - name : Publish package distributions to PyPI
156
+ uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments