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 }}