Skip to content

Commit 7efd9fe

Browse files
authored
Add publish-to-pypi action job (#58)
1 parent f8cd537 commit 7efd9fe

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

.github/workflows/actions.yml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ${{ matrix.os }}
88
strategy:
99
matrix:
10-
os: [ ubuntu-20.04 , windows-2019, macos-11 ]
10+
os: [ ubuntu-20.04 , windows-2019, macos-12 ]
1111
steps:
1212
- uses: actions/checkout@v4
1313
- name: Get proton-python-driver tag
@@ -49,3 +49,30 @@ jobs:
4949
tag_name: ${{ join(steps.*.outputs.tag_name, '') }}
5050
env:
5151
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
52+
- name: Store the distribution packages
53+
uses: actions/upload-artifact@v3
54+
with:
55+
name: python-package-distributions
56+
path: wheelhouse/*.whl
57+
58+
publish-to-pypi:
59+
name: Publish Python distribution to PyPI
60+
needs:
61+
- build_wheels
62+
runs-on: ubuntu-latest
63+
environment:
64+
name: pypi
65+
url: https://pypi.org/p/proton-driver
66+
permissions:
67+
id-token: write # IMPORTANT: mandatory for trusted publishing
68+
steps:
69+
- name: Download all the dists
70+
uses: actions/download-artifact@v3
71+
with:
72+
name: python-package-distributions
73+
path: dist/
74+
- name: Publish distribution to PyPI
75+
uses: pypa/gh-action-pypi-publish@release/v1
76+
with:
77+
username: __token__
78+
password: ${{ secrets.PYPI_TOKEN }}

0 commit comments

Comments
 (0)