From fb74d1f9ed5c555498c144e963fe6be958f561cf Mon Sep 17 00:00:00 2001 From: PPawlowski Date: Sun, 1 Dec 2024 19:22:37 +0100 Subject: [PATCH] Add package release workflow --- .github/workflows/release.yaml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..28efee2 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,30 @@ +name: Release +on: + push: + tags: + - "v*.*.*" + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 18 + + - name: Install dependencies + run: npm ci + + - name: Build and test + run: | + npm run build + npm run test + + - name: Publish package + uses: JS-DevTools/npm-publish@v3 + with: + token: ${{ secrets.NPM_PUBLISH_TOKEN }}