Skip to content

Commit

Permalink
ci: upload to (test)pypi when tagged (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaikoTan authored Sep 11, 2020
1 parent 37d1551 commit 07fd3f2
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/upload-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: upload pypi

on:
push:
tags:
- 'v*'
- '!v**-alpha*' # do not release when specify as alpha


jobs:
test:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- uses: actions/setup-python@v1
with:
python-version: 3.8

- name: Upgrade Packaging Tools
run: |
python3 -m pip install --user --upgrade setuptools wheel twine
- name: Generate Python Package
run: |
python3 setup.py sdist bdist_wheel
- name: Publish package to TestPyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.test_pypi_token }}
repository_url: https://test.pypi.org/legacy/

0 comments on commit 07fd3f2

Please sign in to comment.