diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8b7338ad..07213bf2 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -46,9 +46,10 @@ jobs: - name: Publish env: NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NPM_TAG: ${{ github.event.release.prerelease == true && 'next' || 'latest' }} run: | npm config set //registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN} - npm publish --tag next + npm publish --tag $NPM_TAG - name: Push changes run: git push