Repository navigation
ci: publish to npm via trusted publishing - #35
Merged
Merged
Conversation
publish-npm.yml calls servicekit's shared npm-publish.yml, which installs with pnpm, builds, runs this repo's checks and tests, refuses a tarball with test files, and publishes through npm trusted publishing (no token).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
package.json..github/workflows/publish-npm.ymlpublishes on av*tag through servicekit's sharednpm-publish.yml, using npm trusted publishing, so there's no token to store.check:esm,lintandpnpm test, refuses a tarball with*.test.*files, checks the tag againstpackage.json, and skips a version already on npm.package.jsonand tagv1.1.0say 1.1.0, but npm's latest is 1.0.9, so 1.1.0 was never published. Thev1.1.0tag predates this workflow, so it can't publish it; the next tag (or a manualnpm publish) will.Reviewer's guide
publish-npm.yml.Read:
.github/workflows/publish-npm.yml.Risk / blast radius
npx npm@latest trust github notations --repo panyam/notations --file publish-npm.yml --allow-publish.v*tag.npm publishby hand still works.pnpm install --frozen-lockfile --ignore-scripts,npm run buildandcheck:esm,lintandpnpm testall pass, and the tarball has no test files.