Skip to content

Commit 0cd1722

Browse files
committed
Update _pkg_publish.yaml
1 parent 03e06d2 commit 0cd1722

File tree

2 files changed

+61
-36
lines changed

2 files changed

+61
-36
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
2+
name: 'Package - Build'
3+
run-name: 'Package: Build from ${{github.ref}}'
4+
5+
6+
on:
7+
workflow_dispatch:
8+
push:
9+
paths:
10+
- 'pyproject.toml'
11+
12+
jobs:
13+
14+
publish-pypi:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
id-token: write
18+
environment:
19+
name: PyPI
20+
steps:
21+
- name: 'Checkout repository from ${{github.ref}}'
22+
uses: actions/checkout@v4
23+
24+
- name: 'Build sdist'
25+
run: |
26+
pipx run build --sdist --wheel --outdir dist/
27+
28+
- name: 'Upload package'
29+
uses: pypa/gh-action-pypi-publish@release/v1
30+
# https://github.com/marketplace/actions/pypi-publish
31+
with:
32+
packages-dir: dist
33+
verify-metadata: false
34+
verbose: true
35+
print-hash: true
36+
skip-existing: false
37+
38+
publish-testpypi:
39+
runs-on: ubuntu-latest
40+
permissions:
41+
id-token: write
42+
environment:
43+
name: TestPyPI
44+
steps:
45+
- name: 'Checkout repository from ${{github.ref}}'
46+
uses: actions/checkout@v4
47+
48+
- name: 'Build sdist'
49+
run: |
50+
pipx run build --sdist --wheel --outdir dist/
51+
52+
- name: 'Upload package'
53+
uses: pypa/gh-action-pypi-publish@release/v1
54+
# https://github.com/marketplace/actions/pypi-publish
55+
with:
56+
packages-dir: dist
57+
repository-url: https://test.pypi.org/legacy/
58+
verify-metadata: false
59+
verbose: true
60+
print-hash: true
61+
skip-existing: false

.github/workflows/package_release_pypi.yaml

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)