This repository has been archived by the owner on Nov 21, 2023. It is now read-only.
.github/workflows/main.yml #96
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
on: push | ||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
os: [windows, macos, ubuntu] | ||
node-version:[latest, lts] | ||
runs-on: ${{ matrix.os }}-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm install-ci-test | ||
npm-publish: | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: latest | ||
registry-url: https://registry.npmjs.org/ | ||
- run: npm ci && npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |