Skip to content

Commit 580ca24

Browse files
committed
make new release action
1 parent b4ed225 commit 580ca24

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/release.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
release:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- name: Set up Python
14+
uses: actions/setup-python@v4
15+
with:
16+
python-version: '3.7'
17+
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install build twine wheel
22+
pip install -e .
23+
24+
- name: Run tests
25+
run: |
26+
pip install pytest
27+
pytest tests/
28+
29+
- name: Build package
30+
run: |
31+
python -m build
32+
33+
- name: Publish to PyPI
34+
env:
35+
TWINE_USERNAME: __token__
36+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
37+
run: |
38+
twine upload dist/*

0 commit comments

Comments
 (0)