From 9671452a33b1faed8806001b4a42a56302ac3c72 Mon Sep 17 00:00:00 2001 From: Gregg Tavares Date: Wed, 12 Jun 2024 10:26:43 -0700 Subject: [PATCH] add build and publish --- .github/workflows/build-and-publish.yml | 28 +++++++++++++++++++++++++ .github/workflows/test.yml | 11 +++------- 2 files changed, 31 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/build-and-publish.yml diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml new file mode 100644 index 0000000..b3ce668 --- /dev/null +++ b/.github/workflows/build-and-publish.yml @@ -0,0 +1,28 @@ +name: Build and Publish +on: + push: + tags: + - v* +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout ๐Ÿ”๐ŸŸ๐Ÿฅค + uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Use Node.js ๐Ÿ˜‚ + uses: actions/setup-node@v4 + with: + node-version: 18 + + - name: Test ๐Ÿงช + run: | + npm ci + npm run check-ci + + - name: Publish to NPM + uses: JS-DevTools/npm-publish@v3 + with: + token: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d98a782..da0484d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,21 +9,16 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout ๐Ÿ”๐ŸŸ๐Ÿฅค - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: persist-credentials: false - name: Use Node.js ๐Ÿ˜‚ - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: 16 + node-version: 18 - name: Test ๐Ÿงช run: | npm ci npm run check-ci - - - name: Publish to NPM - uses: JS-DevTools/npm-publish@v1 - with: - token: ${{ secrets.NPM_TOKEN }}