0.16.7 #2072
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
# This workflow will do a clean install of node dependencies, build the source code and and then publish a package to npm when a release is created | |
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages | |
name: Test and Publish | |
env: | |
NODE_VERSION: 18.x | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- '*' | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- run: yarn | |
- run: yarn lint | |
- run: yarn build | |
- if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
run: yarn build-icons | |
- run: yarn test | |
- name: Coveralls | |
uses: coverallsapp/github-action@v2 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
check-license: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use golang 1.20 | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.20' | |
- name: Use Node.js 18 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
- name: install addlicense | |
run: go install github.com/google/addlicense@latest | |
- name: check license | |
run: npm run check-license | |
publish: | |
runs-on: ubuntu-latest | |
needs: [build] | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
registry-url: ${{ secrets.MIA_NPM_REGISTRY_URL }} | |
- run: yarn install --frozen-lockfile | |
- run: yarn build | |
- if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
run: yarn build-icons | |
- run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.MIA_NPM_REGISTRY_TOKEN }} |