Skip to content

Commit 2e58776

Browse files
committed
ci: add publish job
1 parent 4512b77 commit 2e58776

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

.github/workflows/pypi-publish.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Build then Publish to PyPI
22

3-
on: [push]
3+
on:
4+
release:
5+
types: [published]
46

57
jobs:
68
build-packages:
@@ -26,3 +28,21 @@ jobs:
2628
with:
2729
name: python-package-distributions
2830
path: dist/
31+
32+
publish:
33+
name: Publish distributions to PyPI
34+
needs: build-packages
35+
runs-on: ubuntu-latest
36+
environment:
37+
name: pypi
38+
url: https://pypi.org/p/msl-loadlib
39+
permissions:
40+
id-token: write # IMPORTANT: mandatory for trusted publishing
41+
steps:
42+
- name: Download the stored distributions
43+
uses: actions/download-artifact@v6
44+
with:
45+
name: python-package-distributions
46+
path: dist/
47+
- name: Publish distributions to PyPI
48+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)