Skip to content

Commit 779b0a9

Browse files
committed
add release workflow
1 parent 7d7a234 commit 779b0a9

File tree

3 files changed

+3259
-3
lines changed

3 files changed

+3259
-3
lines changed

.github/workflows/release.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v2
14+
- name: setup python
15+
uses: actions/setup-python@v2
16+
with:
17+
python-version: 3.11
18+
19+
- name: build
20+
shell: bash
21+
run: |
22+
python -m pip install --upgrade wheel setuptools build
23+
python -m build
24+
- name: Release PyPI
25+
shell: bash
26+
env:
27+
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
28+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
29+
run: |
30+
pip install --upgrade twine
31+
twine upload dist/*
32+
- name: Release GitHub
33+
uses: softprops/action-gh-release@v1
34+
with:
35+
files: "dist/*"
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)