PR-113325:

Adding CI/CD in github actions and updating packages.
This commit is contained in:
2022-07-29 03:22:02 +00:00
parent dcc389df10
commit c8f9d61526
5 changed files with 323 additions and 265 deletions

29
.github/workflows/npm-publish.yml vendored Normal file
View File

@ -0,0 +1,29 @@
name: NPM testing and publish package
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm ci
- run: npm test
publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

24
.github/workflows/npm-test.yml vendored Normal file
View File

@ -0,0 +1,24 @@
name: Testing package
on:
pull_request:
branches: ['*']
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v3
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- run: npm ci
- run: npm test