Merge pull request #17 from Enecuum/master #32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Node.js CI | |
on: | |
push: | |
branches: [ release ] | |
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@v1 | |
with: | |
fetch-depth: 0 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
registry-url: https://registry.npmjs.org/ | |
- name: install dependencies | |
run: npm i | |
env: | |
CI: true | |
- name: get-npm-version | |
id: package-version | |
uses: martinbeentjes/npm-get-version-action@master | |
- name: build bundle | |
run: | | |
mkdir dist | |
npm run buildAll | |
env: | |
CI: true | |
- name: "release Github" | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "./" | |
tag: ${{ steps.package-version.outputs.current-version }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: "push NPM package" | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |