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 :
3132 - os : ubuntu
3233 platform : linux
3334 target : aarch64
34- # mimalloc not supported on manylinux2014 cross-compile container
35- extra-build-args : --no-default-features
3635 # musllinux
3736 - os : ubuntu
3837 platform : linux
@@ -46,14 +45,10 @@ jobs:
4645 platform : linux
4746 target : ppc64le
4847 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
5148 - os : ubuntu
5249 platform : linux
5350 target : s390x
5451 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
5752
5853 runs-on : ${{ matrix.os }}-latest
5954 steps :
@@ -77,13 +72,14 @@ jobs:
7772
7873 - run : ${{ matrix.ls || 'ls -lh' }} dist/
7974
80- - uses : actions/upload-artifact@v3
75+ - uses : actions/upload-artifact@v4
8176 with :
82- name : dist
77+ name : dist-${{ matrix.os }}-${{ matrix.target }}-${{ matrix.manylinux }}
8378 path : dist
8479
8580 build_sdist :
8681 runs-on : ubuntu-latest
82+ environment : release
8783 steps :
8884 - uses : actions/checkout@v3
8985 - name : Build sdist
@@ -92,30 +88,49 @@ jobs:
9288 command : sdist
9389 args : --out dist
9490 - name : Upload sdist
95- uses : actions/upload-artifact@v3
91+ uses : actions/upload-artifact@v4
9692 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
98113 path : dist
99114
100115
101116 Release :
102- needs : [ build, build_sdist ]
103- if : success() && startsWith(github.ref, 'refs/tags/')
117+ needs : [ build, build_sdist, build_none ]
118+ if : success()
104119 runs-on : ubuntu-latest
105-
120+ environment : release
121+ permissions :
122+ id-token : write
123+ contents : write
106124 steps :
107125 - name : Checkout code
108126 uses : actions/checkout@v2
109127
110128 - name : Download artifacts
111- uses : actions/download-artifact@v3
129+ uses : actions/download-artifact@v4
112130 with :
113- name : dist
131+ pattern : dist*
114132 path : dist
115-
116- - name : Install Poetry
117- run : |
118- curl -fsS https://install.python-poetry.org | python - -y
133+ merge-multiple : true
119134
120135 - name : Update PATH
121136 run : echo "$HOME/.local/bin" >> $GITHUB_PATH
@@ -134,12 +149,8 @@ jobs:
134149 uses : ncipollo/release-action@v1
135150 with :
136151 artifacts : " dist/*"
137- token : ${{ secrets.GITHUB_TOKEN }}
138152 draft : false
139153 prerelease : steps.check-version.outputs.prerelease == 'true'
140154
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