forked from deephaven/deephaven-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (44 loc) · 1.57 KB
/
Copy pathbuild-python-package.yml
File metadata and controls
54 lines (44 loc) · 1.57 KB
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
name: Build Python Package
on:
workflow_call:
inputs:
package:
required: true
type: string
jobs:
build-python-package:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Check file existence
id: check_files
uses: andstor/file-existence-action@v3
with:
files: "plugins/${{ inputs.package }}/src/js/package.json"
- name: Setup Node
if: steps.check_files.outputs.files_exists == 'true'
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install npm dependencies
if: steps.check_files.outputs.files_exists == 'true'
run: npm ci
- name: Build npm packages
if: steps.check_files.outputs.files_exists == 'true'
run: npm run build -- --scope "@deephaven/js-plugin-${{ inputs.package }}"
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install build dependencies
run: python -m pip install --upgrade setuptools wheel build
- name: Build wheel
run: python -m build --wheel --sdist plugins/${{ inputs.package }}
- name: Upload dist
uses: actions/upload-artifact@v3
with:
name: dist-${{ inputs.package }}
path: plugins/${{ inputs.package }}/dist/
if-no-files-found: error