Skip to content

Commit ecf869d

Browse files
committed
Add publish workflow
1 parent 59c2dcf commit ecf869d

3 files changed

Lines changed: 26 additions & 99 deletions

File tree

.github/workflows/python-publish.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ jobs:
1717
uses: actions/setup-python@v2
1818
with:
1919
python-version: 3.9
20+
- name: Set up Node
21+
- uses: actions/setup-node@v2
22+
with:
23+
node-version: '14'
2024

2125
- name: Install dependencies
2226
run: |
@@ -25,8 +29,20 @@ jobs:
2529
poetry env use system
2630
poetry install
2731
28-
- name: Build and publish
32+
- name: Build JavaScript library
33+
run: |
34+
cd javascript
35+
npm install
36+
npm run-script build
37+
38+
- name: Build and publish Python module
2939
env:
3040
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
3141
run:
3242
poetry publish --build
43+
44+
- name: Publish Node module
45+
run: |
46+
npm publish
47+
env:
48+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

pyproject.toml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@ version = "1.2.5"
44
description = "A REST API for managing background tasks in Django"
55
authors = ["Nikolas Stevenson-Molnar <nik.molnar@consbio.org>"]
66
license = "MIT"
7+
packages = [
8+
{ include = "task_api" }
9+
]
10+
include = ["task_api/static/*.js"]
711
classifiers = [
8-
'Programming Language :: Python :: 3',
9-
'Programming Language :: Python :: 3.6',
10-
'Programming Language :: Python :: 3.7',
11-
'Programming Language :: Python :: 3.8',
12-
'Programming Language :: Python :: 3.9'
12+
"Programming Language :: Python :: 3",
13+
"Programming Language :: Python :: 3.6",
14+
"Programming Language :: Python :: 3.7",
15+
"Programming Language :: Python :: 3.8",
16+
"Programming Language :: Python :: 3.9"
1317
]
1418

1519
[tool.poetry.dependencies]

setup.py

Lines changed: 0 additions & 93 deletions
This file was deleted.

0 commit comments

Comments
 (0)