-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (51 loc) · 1.43 KB
/
_pkg_publish.yaml
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
name: 'Package - Build'
run-name: 'Package: Build from ${{github.ref}}'
on:
workflow_dispatch:
push:
paths:
- 'pyproject.toml'
jobs:
publish-pypi:
runs-on: ubuntu-latest
permissions:
id-token: write
environment:
name: PyPI
steps:
- name: 'Checkout repository from ${{github.ref}}'
uses: actions/checkout@v4
- name: 'Build sdist'
run: |
pipx run build --sdist --wheel --outdir dist/
- name: 'Upload package'
uses: pypa/gh-action-pypi-publish@release/v1
# https://github.com/marketplace/actions/pypi-publish
with:
packages-dir: dist
verify-metadata: false
verbose: true
print-hash: true
skip-existing: false
publish-testpypi:
runs-on: ubuntu-latest
permissions:
id-token: write
environment:
name: TestPyPI
steps:
- name: 'Checkout repository from ${{github.ref}}'
uses: actions/checkout@v4
- name: 'Build sdist'
run: |
pipx run build --sdist --wheel --outdir dist/
- name: 'Upload package'
uses: pypa/gh-action-pypi-publish@release/v1
# https://github.com/marketplace/actions/pypi-publish
with:
packages-dir: dist
repository-url: https://test.pypi.org/legacy/
verify-metadata: false
verbose: true
print-hash: true
skip-existing: false