From 7b1dd7e42be8cdd00fc07657077d480611cbc96f Mon Sep 17 00:00:00 2001 From: andres Date: Wed, 15 Nov 2023 18:46:56 +0100 Subject: [PATCH] add publish workflow --- .github/workflows/publish.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..43d01f7 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,29 @@ +name: Publish to NPM +on: + push: + branches: + - master +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [20] + steps: + - uses: actions/checkout@v3 + - uses: pnpm/action-setup@v2 + with: + version: 8 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'pnpm' + - name: Install dependencies + run: pnpm install --no-frozen-lockfile + - name: Build lib + run: pnpm run build + - uses: JS-DevTools/npm-publish@v3 + with: + token: ${{ secrets.NPM_PUBLISH_TOKEN }} + access: 'public' \ No newline at end of file