Skip to content

Commit b66fc9a

Browse files
authored
Merge pull request #62 from ianhi/release-action
Add github action for releasing
2 parents 7ac312d + f419da4 commit b66fc9a

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/release.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Publish Package
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
defaults:
8+
run:
9+
shell: bash -l {0}
10+
11+
jobs:
12+
deploy:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
18+
- name: Install node
19+
uses: actions/setup-node@v1
20+
with:
21+
node-version: '13.x'
22+
registry-url: 'https://registry.npmjs.org'
23+
24+
- name: Install Python
25+
uses: actions/setup-python@v2
26+
with:
27+
python-version: '3.x'
28+
29+
- name: Install dependencies
30+
run: |
31+
python -m pip install --upgrade pip
32+
pip install build twine jupyter-packaging
33+
34+
- name: Build package
35+
run: python -m build
36+
37+
- name: Publish the Python package
38+
env:
39+
TWINE_USERNAME: __token__
40+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
41+
run: twine upload dist/*

0 commit comments

Comments
 (0)