|
@@ -0,0 +1,38 @@
|
|
|
|
+name: Node.js Package
|
|
|
|
+
|
|
|
|
+on:
|
|
|
|
+ push:
|
|
|
|
+ branches:
|
|
|
|
+ - release
|
|
|
|
+ pull_request:
|
|
|
|
+ branches:
|
|
|
|
+ - release
|
|
|
|
+
|
|
|
|
+jobs:
|
|
|
|
+ release:
|
|
|
|
+ name: Release
|
|
|
|
+ runs-on: ubuntu-latest
|
|
|
|
+
|
|
|
|
+ steps:
|
|
|
|
+ - name: Checkout code
|
|
|
|
+ uses: actions/checkout@v4
|
|
|
|
+
|
|
|
|
+ - name: Setup Node.js
|
|
|
|
+ uses: actions/setup-node@v4
|
|
|
|
+ with:
|
|
|
|
+ node-version: '20'
|
|
|
|
+ registry-url: 'https://registry.npmjs.org'
|
|
|
|
+
|
|
|
|
+ - name: Install dependencies
|
|
|
|
+ run: npm install
|
|
|
|
+
|
|
|
|
+ - name: Run build script
|
|
|
|
+ run: npm run build
|
|
|
|
+
|
|
|
|
+ - name: Run test script
|
|
|
|
+ run: npm run test
|
|
|
|
+
|
|
|
|
+ # - name: Publish package
|
|
|
|
+ # run: npm publish
|
|
|
|
+ # env:
|
|
|
|
+ # NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|