support nodejs (#438)
This commit is contained in:
58
.github/workflows/npm.yaml
vendored
Normal file
58
.github/workflows/npm.yaml
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
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@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
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
|
||||
Reference in New Issue
Block a user