Skip to content

Commit 0d4cc82

Browse files
committed
Trusted publishing.
1 parent efdc4b4 commit 0d4cc82

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/release.yml

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

0 commit comments

Comments
 (0)