99jobs :
1010 build :
1111 name : Build on ${{ matrix.platform || matrix.os }} (${{ matrix.target }} - ${{ matrix.manylinux || 'auto' }})
12+ environment : release
1213 strategy :
1314 fail-fast : false
1415 matrix :
@@ -18,19 +19,20 @@ jobs:
1819 include :
1920 - os : ubuntu
2021 platform : linux
21- - os : ubuntu
22- platform : linux
22+ - os : windows
23+ ls : dir
24+ interpreter : 3.9 3.10 3.11 3.12 3.13 pypy3.9 pypy3.10
25+ - os : windows
26+ ls : dir
2327 target : aarch64
28+ interpreter : 3.11 3.12 3.13
29+ - os : macos
30+ target : aarch64
31+ interpreter : 3.9 3.10 3.11 3.12 3.13 pypy3.9 pypy3.10
2432 - os : ubuntu
2533 platform : linux
26- target : ppc64le
27- interpreter : 3.9 3.10 3.11 3.12 3.13
28- - os : ubuntu
29- platform : linux
30- target : s390x
31- interpreter : 3.9 3.10 3.11 3.12 3.13
32-
33- # musllinux
34+ target : aarch64
35+ # musllinux
3436 - os : ubuntu
3537 platform : linux
3638 target : x86_64
@@ -39,25 +41,14 @@ jobs:
3941 platform : linux
4042 target : aarch64
4143 manylinux : musllinux_1_1
42-
43- - os : windows
44- target : x86_64
45- interpreter : pypy3 .9 pypy3 .10
46- - os : windows
47- target : i686
48- python-architecture : x86
44+ - os : ubuntu
45+ platform : linux
46+ target : ppc64le
47+ interpreter : 3 .9 3 .10 3.11 3.12 3.13
48+ - os : ubuntu
49+ platform : linux
50+ target : s390x
4951 interpreter : 3.9 3.10 3.11 3.12 3.13
50- - os : windows
51- target : aarch64
52- interpreter : 3.11 3.12 3.13
53-
54- - os : macos
55- target : x86_64
56- - os : macos
57- target : aarch64
58- interpreter : 3.9 3.10 3.11 3.12 3.13 pypy3.9 pypy3.10
59-
60-
6152
6253 runs-on : ${{ matrix.os }}-latest
6354 steps :
@@ -79,15 +70,16 @@ jobs:
7970 rust-toolchain : stable
8071 docker-options : -e CI
8172
82- - run : ${{ matrix.ls || 'ls -l ' }} dist/
73+ - run : ${{ matrix.ls || 'ls -lh ' }} dist/
8374
84- - uses : actions/upload-artifact@v3
75+ - uses : actions/upload-artifact@v4
8576 with :
86- name : dist
77+ name : dist-${{ matrix.os }}-${{ matrix.target }}-${{ matrix.manylinux }}
8778 path : dist
8879
8980 build_sdist :
9081 runs-on : ubuntu-latest
82+ environment : release
9183 steps :
9284 - uses : actions/checkout@v3
9385 - name : Build sdist
@@ -96,30 +88,49 @@ jobs:
9688 command : sdist
9789 args : --out dist
9890 - name : Upload sdist
99- uses : actions/upload-artifact@v3
91+ uses : actions/upload-artifact@v4
10092 with :
101- 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
102113 path : dist
103114
104115
105116 Release :
106- needs : [ build, build_sdist ]
107- if : success() && startsWith(github.ref, 'refs/tags/')
117+ needs : [ build, build_sdist, build_none ]
118+ if : success()
108119 runs-on : ubuntu-latest
109-
120+ environment : release
121+ permissions :
122+ id-token : write
123+ contents : write
110124 steps :
111125 - name : Checkout code
112126 uses : actions/checkout@v2
113127
114128 - name : Download artifacts
115- uses : actions/download-artifact@v3
129+ uses : actions/download-artifact@v4
116130 with :
117- name : dist
131+ pattern : dist*
118132 path : dist
119-
120- - name : Install Poetry
121- run : |
122- curl -fsS https://install.python-poetry.org | python - -y
133+ merge-multiple : true
123134
124135 - name : Update PATH
125136 run : echo "$HOME/.local/bin" >> $GITHUB_PATH
@@ -138,12 +149,8 @@ jobs:
138149 uses : ncipollo/release-action@v1
139150 with :
140151 artifacts : " dist/*"
141- token : ${{ secrets.GITHUB_TOKEN }}
142152 draft : false
143153 prerelease : steps.check-version.outputs.prerelease == 'true'
144154
145- - name : Publish to PyPI
146- env :
147- POETRY_PYPI_TOKEN_PYPI : ${{ secrets.PYPI_TOKEN }}
148- run : |
149- poetry publish
155+ - name : Publish package distributions to PyPI
156+ uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments