-
Notifications
You must be signed in to change notification settings - Fork 27
55 lines (43 loc) · 1.39 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# This is a separate workflow because we don't want a matrix build for the release (we only want one package)
name: Publish Release
# Whenever we publish a release
on:
release:
types: [created]
jobs:
deploy:
env:
# Webpack uses around 2GB to build, which is more than the default heap size. We bump it to 4 GB here just in case
NODE_OPTIONS: "--max-old-space-size=4096"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/[email protected]
with:
python-version: "3.x"
- name: Set up Node
uses: actions/[email protected]
with:
node-version: "12.x"
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[dev,deploy]
- name: Install node dependencies
run: npm install
- name: Build JavaScript
run: npm run build --if-present
- name: Build python package
run: |
python setup.py sdist bdist_wheel
- name: Upload to existing release
uses: AButler/[email protected]
with:
files: "dist/*"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}