-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathrelease.yml
More file actions
68 lines (60 loc) · 1.68 KB
/
release.yml
File metadata and controls
68 lines (60 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
on:
release:
types:
- published
name: release
jobs:
build:
name: Build distributions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@6b9c6063abd6010835644d4c2e1bef4cf5cd0fca # v6
- name: Build distributions
run: uv build
- name: Upload distributions
uses: actions/upload-artifact@v4
with:
name: distributions
path: dist/
generate-provenance:
name: Generate SLSA provenance for distributions
runs-on: ubuntu-latest
needs: [build]
permissions:
id-token: write # To sign the provenance.
attestations: write # To persist the attestation files.
steps:
- name: Download distributions
uses: actions/download-artifact@v4
with:
name: distributions
path: dist/
- name: Generate build provenance
uses: actions/attest-build-provenance@v2
with:
subject-path: 'dist/*'
publish:
name: Publish Python distributions to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/{{cookiecutter.project_slug}}
needs: [build, generate-provenance]
permissions:
# Used to sign the release's artifacts with sigstore-python.
# Used to publish to PyPI with Trusted Publishing.
id-token: write
steps:
- name: Download distributions
uses: actions/download-artifact@v4
with:
name: distributions
path: dist/
- name: Publish distributions
uses: pypa/gh-action-pypi-publish@release/v1
with:
attestations: true