Skip to content

Commit f6105b0

Browse files
updates
1 parent a1fbc21 commit f6105b0

1 file changed

Lines changed: 33 additions & 2 deletions

File tree

.github/workflows/release.yaml

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,40 @@ jobs:
2626
- name: Install dependencies
2727
run: |
2828
python -m pip install --upgrade pip
29-
# pip install flake8 pytest
3029
pip install -r requirements.txt
3130
pip install -r tests/requirements.txt
3231
- name: Test with pytest
3332
run: |
34-
pytest
33+
pytest
34+
35+
36+
release:
37+
needs:
38+
- test-suite
39+
if: startsWith(github.ref, 'refs/tags/')
40+
runs-on: ubuntu-latest
41+
steps:
42+
- uses: actions/checkout@v2
43+
- name: Create Release
44+
id: create_release
45+
uses: actions/create-release@v1
46+
env:
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
with:
49+
tag_name: ${{ github.ref }}
50+
release_name: Release ${{ github.ref }}
51+
draft: false
52+
prerelease: false
53+
54+
55+
deploy:
56+
runs-on: ubuntu-latest
57+
needs:
58+
- release
59+
steps:
60+
- name: Publish package
61+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
62+
uses: pypa/gh-action-pypi-publish@master
63+
with:
64+
user: __token__
65+
password: ${{ secrets.PYPI_DEPLOYMENT_TOKEN }}

0 commit comments

Comments
 (0)