From ef5bde605f4258ab66a5e0bf0b8297fe45f22d5a Mon Sep 17 00:00:00 2001 From: Nathan Friedly Date: Tue, 17 Oct 2023 13:36:42 -0400 Subject: [PATCH] Create ci.yml --- .github/workflows/ci.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..a198fa0 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,30 @@ +on: [push, pull_request] + +jobs: + test: + strategy: + matrix: + node-version: [lts/*, latest] + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + - run: npm ci + - run: npm test + + publish-npm: + needs: test + if: startsWith(github.ref, 'refs/tags/v') + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: lts/* + registry-url: https://registry.npmjs.org/ + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}}