-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (42 loc) · 1.04 KB
/
pypi.yml
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
---
name: PyPI Publish
on: workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: pipx run build
- uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: dist/*
upload:
runs-on: ubuntu-latest
# if: github.event_name == 'release' && github.event.action == 'published'
needs: [build]
environment:
name: pypi
url: https://pypi.org/p/acro
permissions:
id-token: write
contents: read
attestations: write
steps:
- uses: actions/download-artifact@v4
with:
pattern: build-*
path: dist
merge-multiple: true
- name: Attest
uses: actions/attest-build-provenance@v1
with:
subject-path: "dist/*"
- name: Publish on PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist/
# repository-url: https://test.pypi.org/legacy/
...