From 194542833bc8d1edf9db69091067e81a6708c897 Mon Sep 17 00:00:00 2001 From: Kshitij Chauhan Date: Sat, 6 Apr 2024 22:16:53 +0100 Subject: [PATCH] Add publishing workflow --- .github/workflows/publish.yaml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/publish.yaml diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..7ff831b --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,31 @@ +name: Publish + +on: + workflow_dispatch: + push: + tags: + - "*" + +jobs: + publish: + runs-on: ubuntu-latest + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + + steps: + steps: + - uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 20.x + cache: "npm" + + - run: npm ci + + - run: npm run build + + - run: npm test + + - run: npm publish