Skip to content

Commit 0cfa351

Browse files
authored
Merge pull request #80 from ns1/add_release_action_v2
Add release action on tag
2 parents 1fa4293 + b3e3527 commit 0cfa351

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Build distribution
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
runs-on: "ubuntu-latest"
8+
9+
steps:
10+
- name: Checkout source
11+
uses: actions/checkout@v2
12+
13+
- name: Set up Python 3.8
14+
uses: actions/setup-python@v1
15+
with:
16+
python-version: 3.8
17+
18+
- name: Install build dependencies
19+
run: python -m pip install build wheel
20+
21+
- name: Build distributions
22+
shell: bash -l {0}
23+
run: python setup.py sdist bdist_wheel
24+
25+
- name: Publish package to PyPI
26+
if: github.repository == 'ns1/ns1-python' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
27+
uses: pypa/gh-action-pypi-publish@master
28+
with:
29+
user: __token__
30+
password: ${{ secrets.ns1_python_publish }}

0 commit comments

Comments
 (0)