Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic npm publish action #20

Merged
merged 1 commit into from
Oct 2, 2020
Merged

Conversation

TheWebDevel
Copy link
Contributor

Refer https://github.com/marketplace/actions/publish-to-npm. Adding their instruction to this PR to make it easier for you.

When someone changes the version in package.json to 1.2.3 and pushes a commit to master with the message Release 1.2.3, the npm-publish action will create a new tag v1.2.3 and publish the package to the npm registry.

Inputs

These inputs are optional: that means that if you don't enter them, default values will be used and it'll work just fine.

tag_name: the name pattern of the new tag
tag_message: the message pattern of the new tag
commit_pattern: the pattern that the commit message needs to follow
workspace: custom workspace directory that contains the package.json file

Environment variables

GITHUB_TOKEN: this is a token that GitHub generates automatically, you only need to pass it to the action as in the example
NPM_AUTH_TOKEN: this is the token the action will use to authenticate to npm. You need to generate one in npm, then you can add it to your secrets (settings -> secrets) so that it can be passed to the action. DO NOT put the token directly in your workflow file.

@praveenjuge
Copy link
Owner

Thanks!

@praveenjuge praveenjuge merged commit 8c72d95 into praveenjuge:master Oct 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants