Skip to content

Merge pull request #34 from ShiftLeftSecurity/olof/fix/can-not-run-lo… #46

Merge pull request #34 from ShiftLeftSecurity/olof/fix/can-not-run-lo…

Merge pull request #34 from ShiftLeftSecurity/olof/fix/can-not-run-lo… #46

Workflow file for this run

name: Node CI
on:
push:
branches:
- master
- feature/*
- release/*
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
node-version: [14.x, 16.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install, build and test
run: |
npm install
npm test
env:
CI: true
pkg:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Produce pkg - 16
run: |
sudo npm install -g pkg
npm install
pkg -t node16-linux-x64,node16-linux-arm64,node16-win-x64,node16-mac-x64 package.json --out-path dist-16
- name: Test pkg
run: |
chmod +x dist-16/cdxgen*
./dist-16/cdxgen-linux-x64 -v
./dist-16/cdxgen-linux-x64 .
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Produce pkg - lts
run: |
sudo npm install -g pkg
npm install
pkg -t node14-linux,node14-win,node14-mac package.json --out-path dist
- name: Test pkg
run: |
chmod +x dist/cdxgen*
./dist/cdxgen-linux -v
./dist/cdxgen-linux .
- uses: actions/upload-artifact@v1
with:
name: dist-16
path: dist-16
- uses: actions/upload-artifact@v1
with:
name: dist
path: dist
- name: Generate BOM using cdxgen
uses: appthreat/cdxgen-action@v1
with:
output: "./reports/bom.xml"
- uses: actions/upload-artifact@v1
with:
name: reports
path: reports