Skip to content

Commit c311929

Browse files
authored
Merge pull request #514 from itamarst/trusted-publishing
Trusted publishing
2 parents efdc4b4 + 5777a80 commit c311929

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/publish.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Publish
2+
on:
3+
release:
4+
types: [published]
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
- uses: actions/setup-python@v4
12+
with:
13+
python-version: 3.11
14+
- run: |
15+
pip install build
16+
python -m build
17+
- uses: actions/upload-artifact@v4
18+
with:
19+
path: ./dist
20+
21+
publish:
22+
needs: ['build']
23+
environment: 'publish'
24+
runs-on: ubuntu-latest
25+
permissions:
26+
# IMPORTANT: this permission is mandatory for trusted publishing
27+
id-token: write
28+
steps:
29+
- uses: actions/download-artifact@v4
30+
- run: |
31+
ls -R
32+
- name: Publish package distributions to PyPI
33+
uses: pypa/gh-action-pypi-publish@release/v1
34+
with:
35+
packages-dir: artifact/

0 commit comments

Comments
 (0)