diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 9f8c00f..b7e1388 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -5,7 +5,7 @@ name: Publish to npm on: release: - types: [created] + types: [published] jobs: build: @@ -35,6 +35,11 @@ jobs: - run: npm version ${TAG_NAME} --git-tag-version=false env: TAG_NAME: ${{ github.ref_name }} + - run: npm publish --provenance --access public --tag next + if: "github.event.release.prerelease" + env: + NODE_AUTH_TOKEN: ${{ secrets.npm_secret }} - run: npm publish --provenance --access public + if: "!github.event.release.prerelease" env: NODE_AUTH_TOKEN: ${{ secrets.npm_secret }}