Skip to content

Commit e1ece28

Browse files
authored
Merge pull request #442 from P2GX/add-release-action
Add release action
2 parents 03555f7 + 3d3dbe7 commit e1ece28

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/release.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
build-and-publish:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Set up Python
15+
uses: actions/setup-python@v5
16+
with:
17+
python-version: "3.12"
18+
- name: Install the package
19+
run: python -m pip install --editable .[test]
20+
- name: Run tests
21+
run: pytest
22+
- name: Install build libraries
23+
run: python3 -m pip install build
24+
- name: Build package
25+
run: python3 -m build
26+
- name: Publish package to PyPI
27+
uses: pypa/gh-action-pypi-publish@release/v1
28+
with:
29+
password: ${{ secrets.PYPI_TOKEN }}

0 commit comments

Comments
 (0)