Skip to content

Commit 2bb1650

Browse files
committed
Add release workflow.
1 parent c985f58 commit 2bb1650

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: publish release
2+
3+
on: push
4+
5+
jobs:
6+
release:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: setup
11+
uses: actions/setup-python@v2
12+
- name: build
13+
run: python setup.py sdist
14+
- name: Publish snapshot to Test PyPI
15+
if: startsWith(github.ref, 'refs/tags/snapshot/')
16+
uses: pypa/gh-action-pypi-publish@master
17+
with:
18+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
19+
repository_url: https://test.pypi.org/legacy/
20+
- name: Publish release package to PyPI
21+
if: startsWith(github.ref, 'refs/tags/release/')
22+
uses: pypa/gh-action-pypi-publish@master
23+
with:
24+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)