Skip to content

Commit 9061056

Browse files
Add publish workflow (#4)
1 parent 552df49 commit 9061056

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/publish.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Publish
2+
on:
3+
push:
4+
tags:
5+
- '*'
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
12+
- uses: actions/setup-python@v5
13+
with:
14+
python-version: 3.12
15+
16+
- run: |
17+
pip install hatch
18+
hatch build
19+
- uses: actions/upload-artifact@v4
20+
with:
21+
path: ./dist
22+
23+
pypi-publish:
24+
needs: ['build']
25+
environment: 'publish'
26+
27+
name: Upload release to PyPI
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/download-artifact@v4
31+
32+
- name: Publish package to PyPI
33+
uses: pypa/gh-action-pypi-publish@release/v1
34+
with:
35+
password: ${{ secrets.PYPI_TOKEN }}
36+
packages_dir: artifact/

0 commit comments

Comments
 (0)