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