59 lines
1.2 KiB
YAML
59 lines
1.2 KiB
YAML
name: npm
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: npm-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
nodejs:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
python-version: ["3.8"]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 13
|
|
registry-url: 'https://registry.npmjs.org'
|
|
|
|
- name: Display node version
|
|
shell: bash
|
|
run: |
|
|
node --version
|
|
npm --version
|
|
cd nodejs-examples
|
|
|
|
npm install npm@6.14.4 -g
|
|
npm install npm@6.14.4
|
|
npm --version
|
|
|
|
- name: Build nodejs package
|
|
shell: bash
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
run: |
|
|
cd scripts/nodejs
|
|
./run.sh
|
|
npm install
|
|
rm run.sh
|
|
npm ci
|
|
npm publish --provenance --access public
|