Skip to content

Commit 327e2b0

Browse files
committed
GH Actions: publish v0.[0-9]+ tags to PyPI
1 parent 1da5782 commit 327e2b0

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

.github/workflows/release.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
name: Publish to TestPyPI
1+
name: Publish to TestPyPI and PyPI
22

33
on:
44
push:
55
tags:
66
- 'v0.[0-9]+.dev[0-9]+'
7+
- 'v0.[0-9]+'
78

89
permissions: {}
910

@@ -53,3 +54,24 @@ jobs:
5354
uses: pypa/gh-action-pypi-publish@release/v1
5455
with:
5556
repository-url: https://test.pypi.org/legacy/
57+
58+
publish-to-pypi:
59+
name: Publish to PyPI
60+
if: |
61+
!contains(github.ref, '.dev')
62+
runs-on: ubuntu-latest
63+
needs:
64+
- publish-to-testpypi
65+
environment:
66+
name: pypi
67+
url: https://pypi.org/p/kaitaistruct
68+
permissions:
69+
id-token: write # IMPORTANT: mandatory for trusted publishing
70+
steps:
71+
- name: Download all the dists
72+
uses: actions/download-artifact@v5
73+
with:
74+
name: python-package-distributions
75+
path: dist/
76+
- name: Publish distribution to TestPyPI
77+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)