24 lines
567 B
YAML
24 lines
567 B
YAML
name: Nodejs build workflow
|
|
on:
|
|
workflow_call:
|
|
jobs:
|
|
build:
|
|
name: Build nodejs distribution
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Use Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20.x'
|
|
- run: npm install
|
|
- run: npm run build --if-present
|
|
- run: npm test --if-present
|
|
- name: Upload dist artifacts
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: artifacts-build
|
|
path: |
|
|
dist/
|
|
retention-days: 10
|