diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0d675fb..7e65ddf 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -79,11 +79,14 @@ jobs: - name: Publish canary run: | + sed -i '/_authToken/d' "$NPM_CONFIG_USERCONFIG" + unset NODE_AUTH_TOKEN BASE_VERSION=$(node -p "require('./package.json').version") SHORT_SHA=$(echo "$GITHUB_SHA" | cut -c1-7) CANARY_VERSION="${BASE_VERSION}-canary.${SHORT_SHA}" npm version "$CANARY_VERSION" --no-git-tag-version --ignore-scripts - npm publish --tag canary --provenance --access public --ignore-scripts + TARBALL=$(pnpm pack --pack-destination /tmp | tail -1) + npx --yes npm@latest publish "$TARBALL" --tag canary --provenance --access public release: name: Publish Release @@ -168,7 +171,10 @@ jobs: - name: Publish to npm run: | - npm publish --tag latest --provenance --access public --ignore-scripts + sed -i '/_authToken/d' "$NPM_CONFIG_USERCONFIG" + unset NODE_AUTH_TOKEN + TARBALL=$(pnpm pack --pack-destination /tmp | tail -1) + npx --yes npm@latest publish "$TARBALL" --tag latest --provenance --access public - name: Create GitHub Release env: