diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 337ce04..fea6fe1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -37,7 +37,14 @@ jobs: # fetch-depth 0 needed by GitHub Release - name: publish to NPM - run: npm publish --access=public + run: | + VERSION=$(node -e 'console.log(require("./package.json").version)') + if printf '%s' "$VERSION" | grep -q -- '-'; then + # prerelease versions get the "next" tag + npm publish --access=public --tag=next + else + npm publish --access=public + fi publish-gpr: needs: build