Skip to content

Commit e9068c8

Browse files
committed
add publishing workflow
1 parent 41941e6 commit e9068c8

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

.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 to PyPI
2+
3+
on: workflow_dispatch
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- name: Set up Poetry
11+
uses: ./.github/actions/setup-poetry
12+
- name: Install dependencies
13+
run: poetry install
14+
- name: Build package
15+
run: poetry build --no-interaction
16+
- name: Upload build artifact
17+
uses: actions/upload-artifact@v4
18+
with:
19+
path: dist/
20+
name: package-dist
21+
22+
publish:
23+
runs-on: ubuntu-latest
24+
needs: build
25+
environment: pypi
26+
permissions:
27+
id-token: write
28+
steps:
29+
- name: Download build artifact
30+
uses: actions/download-artifact@v4
31+
with:
32+
path: ${{ github.workspace }}/dist/
33+
name: package-dist
34+
- name: Publish to PyPI
35+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)