Skip to content

Commit 4dea5a0

Browse files
authored
Automatic releasing (#176)
* Automatic releasing * Update dev-environment.yml
1 parent 4fd1445 commit 4dea5a0

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

.github/workflows/release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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: Setup conda
19+
uses: conda-incubator/setup-miniconda@v2
20+
with:
21+
activate-environment: ipycanvas-dev
22+
environment-file: dev-environment.yml
23+
python-version: ${{ matrix.python-version }}
24+
mamba-version: "*"
25+
auto-activate-base: false
26+
channels: conda-forge
27+
28+
- name: Build package
29+
run: python setup.py sdist bdist_wheel
30+
31+
- name: Publish the Python package
32+
env:
33+
TWINE_USERNAME: __token__
34+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
35+
run: twine upload dist/ipycanvas*
36+
37+
- name: Publish the NPM package
38+
run: |
39+
yarn install && yarn run build
40+
npm publish
41+
env:
42+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
43+
PRE_RELEASE: ${{ github.event.release.prerelease }}

dev-environment.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ dependencies:
88
- jupyterlab=3
99
- ipywidgets>=7.6
1010
- flake8
11+
- setuptools
12+
- wheel
13+
- twine

0 commit comments

Comments
 (0)