Skip to content

Commit 7962d7f

Browse files
committed
Fix release github action
1 parent 7909633 commit 7962d7f

File tree

2 files changed

+39
-21
lines changed

2 files changed

+39
-21
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -75,24 +75,3 @@ jobs:
7575
fail_ci_if_error: true
7676
path_to_write_report: ./codecov_report.gz
7777
verbose: true
78-
79-
- name: Build
80-
run: |
81-
git clean -dfx
82-
python setup.py sdist
83-
python setup.py bdist_wheel
84-
85-
- name: Publish distribution 📦 to Test PyPI
86-
if: startsWith(github.ref, 'refs/tags/v')
87-
uses: pypa/gh-action-pypi-publish@master
88-
with:
89-
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
90-
repository_url: https://test.pypi.org/legacy/
91-
verbose: true
92-
93-
- name: Publish distribution 📦 to PyPI
94-
if: startsWith(github.ref, 'refs/tags/v')
95-
uses: pypa/gh-action-pypi-publish@master
96-
with:
97-
password: ${{ secrets.PYPI_API_TOKEN }}
98-
verbose: true

.github/workflows/release.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2+
on:
3+
release:
4+
types: [released]
5+
6+
jobs:
7+
release:
8+
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Set up Python 3.7
14+
uses: actions/setup-python@v2
15+
with:
16+
python-version: 3.7
17+
18+
- name: Install Tools
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install setuptools wheel twine
22+
23+
- name: Package
24+
run: |
25+
git clean -dfx
26+
python setup.py sdist bdist_wheel
27+
28+
- name: Publish to Test PyPI
29+
uses: pypa/gh-action-pypi-publish@master
30+
with:
31+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
32+
repository_url: https://test.pypi.org/legacy/
33+
verbose: true
34+
35+
- name: Publish to PyPI
36+
uses: pypa/gh-action-pypi-publish@master
37+
with:
38+
password: ${{ secrets.PYPI_API_TOKEN }}
39+
verbose: true

0 commit comments

Comments
 (0)