From 2656e4c32a33080b23e3c2cd7ca346b8dcf867ae Mon Sep 17 00:00:00 2001 From: pamapa Date: Fri, 22 Dec 2023 09:07:34 +0100 Subject: [PATCH] fix: #1316 use npm distribution tags for upcoming releases --- .github/workflows/release.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ef15dd587..dfb723957 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,12 +16,23 @@ jobs: cache: npm registry-url: https://registry.npmjs.org - - run: npm ci - - run: npm publish + - name: Install dependencies + run: npm ci + + - name: Publish package release + if: "!github.event.release.prerelease" + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish package pre-release + if: "github.event.release.prerelease" + run: npm publish --tag next env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - run: npm run typedoc + - name: Generate API documentation + run: npm run typedoc - name: Deploy pages uses: peaceiris/actions-gh-pages@v3