Open
Conversation
verhovsky
commented
Jan 27, 2024
| @@ -0,0 +1,26 @@ | |||
| { | |||
| "name": "json-to-go", | |||
| "version": "1.0.0", | |||
Contributor
Author
There was a problem hiding this comment.
or whatever you want
verhovsky
commented
Jan 27, 2024
Comment on lines
+7
to
+8
| "name": "Matt Holt", | ||
| "url": "https://matt.life" |
Contributor
Author
There was a problem hiding this comment.
you can also add your email address
verhovsky
commented
Jan 27, 2024
| with: | ||
| node-version: 20 | ||
| registry-url: https://registry.npmjs.org | ||
| - run: npm publish --access=public --provenance |
Contributor
Author
There was a problem hiding this comment.
--access=public is required for the very first time you publish a package, so people wouldn't constantly accidentally publish their packages publicly instead of using their job's own internal package repository or whatever.
--provenance adds a green checkmark to the release on the npm that links back to the github action that did the publishing
Owner
|
Thanks for this, but... unfortunately I'm not really interested in releasing this on npm (for various reasons). I'll leave this open though in case I change my mind. :) |
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.
I want to use json-to-go in my project and releasing it on npm would make it easy for me to do that.
In order to make this work you have to make an account on npm https://www.npmjs.com/signup generate an Access Token (click on profile picture in the top right) and then add that key as a Secret in the GitHub repo as
NPM_TOKENhttps://github.com/mholt/json-to-go/settings/secrets/actions . After that, when you create a new Release on GitHub https://github.com/mholt/json-to-go/releases/new it should automatically publish to npm.