Skip to content

Commit 75eeae5

Browse files
committed
added release workflow
1 parent 51bb1d2 commit 75eeae5

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

Diff for: .github/workflows/release.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: release
2+
on:
3+
release:
4+
types: [published]
5+
tags:
6+
- v*
7+
8+
env:
9+
TWINE_USERNAME: __token__
10+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
11+
12+
jobs:
13+
release:
14+
environment: release
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v3
18+
- name: Set up Python 3.11
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: "3.11"
22+
architecture: x64
23+
24+
- name: Build sdist and wheel
25+
run: |
26+
pip install --upgrade pip build wheel
27+
python3 -m build
28+
29+
- name: Push release to PyPI
30+
if: github.event_name == 'release'
31+
run: |
32+
pip install --upgrade twine
33+
twine check dist/*
34+
twine upload dist/*

0 commit comments

Comments
 (0)