Skip to content

Commit a53160b

Browse files
committed
publish-pypi: update action acording to newer version of maturin
Signed-off-by: Tristram Gräbener <tristram+git@tristramg.eu>
1 parent 6cee252 commit a53160b

1 file changed

Lines changed: 16 additions & 19 deletions

File tree

.github/workflows/publish_pypi.yaml

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# This file is autogenerated by maturin v1.7.1
1+
# This file is autogenerated by maturin v1.7.4
2+
# And modified to add working-directories
23
# To update, run
34
#
45
# maturin generate-ci github
@@ -142,30 +143,26 @@ jobs:
142143
name: wheels-macos-${{ matrix.platform.target }}
143144
path: dist
144145

145-
sdist:
146-
runs-on: ubuntu-latest
147-
steps:
148-
- uses: actions/checkout@v4
149-
- name: Build sdist
150-
uses: PyO3/maturin-action@v1
151-
with:
152-
command: sdist
153-
args: --out dist
154-
working-directory: './python'
155-
- name: Upload sdist
156-
uses: actions/upload-artifact@v4
157-
with:
158-
name: wheels-sdist
159-
path: dist
160-
161146
release:
162147
name: Release
163148
runs-on: ubuntu-latest
164-
if: "startsWith(github.ref, 'refs/tags/')"
165-
needs: [linux, musllinux, windows, macos, sdist]
149+
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
150+
needs: [linux, musllinux, windows, macos]
151+
permissions:
152+
# Use to sign the release artifacts
153+
id-token: write
154+
# Used to upload release artifacts
155+
contents: write
156+
# Used to generate artifact attestation
157+
attestations: write
166158
steps:
167159
- uses: actions/download-artifact@v4
160+
- name: Generate artifact attestation
161+
uses: actions/attest-build-provenance@v1
162+
with:
163+
subject-path: 'wheels-*/*'
168164
- name: Publish to PyPI
165+
if: "startsWith(github.ref, 'refs/tags/')"
169166
uses: PyO3/maturin-action@v1
170167
env:
171168
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)