From a065456f410fe1cf7375e842d95e41dd02438f8b Mon Sep 17 00:00:00 2001 From: Richard Herman Date: Wed, 28 Feb 2024 18:15:31 +0000 Subject: [PATCH] build: add 20.8.1 nodejs build, and release workflow --- .github/workflows/build.yml | 2 +- .github/workflows/release.yml | 46 +++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9b73c7cc..8740afb0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,7 +24,7 @@ jobs: Build: strategy: matrix: - node_version: ["20.5.1"] + node_version: ["20.5.1", "20.8.1"] os: ["macos-latest", "windows-latest"] runs-on: ${{ matrix.os }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..27eab9d3 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,46 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json +name: Release + +on: + push: + tags: + - "*" + +defaults: + run: + shell: bash + +jobs: + Release: + runs-on: "windows-latest" + + permissions: + contents: read + id-token: write + + steps: + - name: "๐Ÿ“ฅ Checkout" + uses: actions/checkout@v4 + + - name: "๐Ÿ—ƒ๏ธ Setup Node" + uses: actions/setup-node@v4 + with: + node-version: "20.8.1" + registry-url: "https://registry.npmjs.org" + + - name: "๐Ÿ“ Install dependencies" + run: npm ci + + - name: "๐Ÿ—๏ธ Build" + run: npm run build + + - name: "๐Ÿ–Œ๏ธ Lint" + run: npm run lint + + - name: "๐Ÿงช Test" + run: npm run test + + - name: "๐Ÿ“ค Publish" + run: npm publish --provenance --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}