@primer/publish v0.2.1-rc.f656ad2
primer/publish
This GitHub Action publishes to npm with the following conventions:
- If we're on the
masterbranch, theversionfield is used as-is and we just runnpm publish --access public. - If we're on a
release-<version>branch, we publish a release candidate to thenextnpm dist-tag with the version in the form:<version>-rc.<sha> - Otherwise, we publish a "canary" release, which has a version in the form:
0.0.0-<sha>.
Also:
- If the version in
package.jsonis already published, we exit with a78code, which is Actions-speak for "neutral". - On the
masterbranch, we push the version commits back to GitHub via git.
Status checks
Two status checks will be listed for this action in your checks: publish is the action's check, and publish {package-name} is a commit status created by the action that reports the version published and links to unpkg.com via "Details":

Usage
To use this action in your own workflow, add the following snippet to your .github/main.workflow file:
action "publish" {
uses = "primer/publish@master"
secrets = [
"GITHUB_TOKEN",
"NPM_AUTH_TOKEN",
]
}You will need to provide an npm access token with publish permissions via the NPM_AUTH_TOKEN secret in the Actions visual editor if you haven't already.
To avoid racking up failed publish actions, we suggest that you place this action after any linting and test actions.
npm CLI arguments
It's possible to pass additional arguments to npm via the args field in your workflow action. Because the primer-publish CLI accepts options of its own (such as --dry-run), you need to prefix any npm arguments with --:
action "publish" {
uses = "primer/publish@master"
+ args = ["--", "--registry=https://registry.your.org"]6 years ago
6 years ago
6 years ago
6 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago