woodpecker-npm
take username and password or token to publish npm package
add .npmrc at git ignore
must set package.json at path npm-folder or workspace
by npm docs package-json.publishconfig
args registry
{
"publishConfig": {
"registry": "https://registry.npmjs.org/"
}
}
| Name | Required | Default value | Description |
|---|---|---|---|
debug | no | false | open debug log or open by env PLUGIN_DEBUG |
npm-registry | no | none | NPM registry settings if empty will use https://registry.npmjs.org/ |
npm-username | yes | none | NPM username |
npm-password | yes | none | NPM password |
npm-token | yes | none | NPM token to use when publishing packages. if token is set, username and password will be ignored. |
npm-email | yes | none | NPM email |
npm-folder | no | none | folder containing package.json, empty will use workspace |
npm-dry-run | no | false | NPM dry run mode, will not publish to NPM registry (v1.1+) |
npm-tag | no | none | NPM publish option to avoid tag being marked as latest, commonly used are beta, alpha, experimental, etc. |
npm-force-tag | no | false | NPM enable this will check the prefix of the prerelase version by semver, when tag name not latest or next, open this will force publish. |
npm-access | no | none | NPM scoped package access |
custom settings
| Name | Required | Default value | Description |
|---|---|---|---|
npm-fail-on-version-conflict | no | false | fail NPM publish if version already exists in NPM registry |
npm-skip-verify-ssl | no | false | disables ssl verification when communicating with the NPM registry. |
npm-skip-whoami | no | false | Skip npm whoami check |
npm-rc-user-home-enable | no | false | enable .npmrc file write user home, default .npmrc file will write in npm-folder (version v1.1+) |
Hide Settings:
| Name | Required | Default value | Description |
|---|---|---|---|
timeout_second | no | 10 | command timeout setting by second |
woodpecker-kit-steps-transfer-file-path | no | .woodpecker_kit.steps.transfer | Steps transfer file path, default by wd_steps_transfer.DefaultKitStepsFileName |
woodpecker-kit-steps-transfer-disable-out | no | false | Steps transfer write disable out |
dockerlabels:
backend: docker
steps:
woodpecker-npm:
image: sinlov/woodpecker-npm:latest
pull: false
settings:
# debug: true
## registry settings if empty will use https://registry.npmjs.org/
# npm-registry: https://verdaccio.foo.com
npm-username: # NPM username
from_secret: npm_publish_username
npm-password: # NPM password
from_secret: npm_publish_password
npm-email: # NPM email
from_secret: npm_publish_email
# npm-dry-run: true # dry run mode, will not publish to NPM registry
# npm-folder: . # folder containing package.json, empty will use workspace
# npm-tag: alpha # NPM publish option to avoid tag being marked as latest, commonly used are beta, alpha, experimental, etc. do not use latest, next
## fail NPM publish if version already exists in NPM registry, most use in tag publish
# npm-fail-on-version-conflict: true
local, must install at local and effective at evn PATHgo install -a github.com/woodpecker-kit/woodpecker-npm/cmd/woodpecker-npm@latest
go install -v github.com/woodpecker-kit/woodpecker-npm/cmd/[email protected]
labels:
backend: local
steps:
woodpecker-npm:
image: woodpecker-npm
settings:
# debug: true
## registry settings if empty will use https://registry.npmjs.org/
# npm-registry: https://verdaccio.foo.com
npm-username: # NPM username
from_secret: npm_publish_username
npm-password: # NPM password
from_secret: npm_publish_password
npm-email: # NPM email
from_secret: npm_publish_email
# npm-dry-run: true # dry run mode, will not publish to NPM registry
# npm-folder: . # folder containing package.json, empty will use workspace
# npm-tag: alpha # NPM publish option to avoid tag being marked as latest, commonly used are beta, alpha, next, etc.
## fail NPM publish if version already exists in NPM registry, most use in tag publish
# npm-fail-on-version-conflict: true
settings.debug will try file browser use override for debug.labels:
backend: docker
steps:
woodpecker-npm:
image: sinlov/woodpecker-npm:latest
pull: false
settings:
# debug: true
## registry settings if empty will use https://registry.npmjs.org/
# npm-registry: https://verdaccio.foo.com
## NPM username
npm-username:
from_secret: npm_publish_username
## NPM password
npm-password:
from_secret: npm_publish_password
## NPM token to use when publishing packages. if token is set, username and password will be ignored.
npm-token:
from_secret: npm_publish_token
## NPM email
npm-email:
from_secret: npm_publish_email
npm-dry-run: true # dry run mode, will not publish to NPM registry
## NPM tag to use when publishing packages. this will cover package.json version field.
npm-tag: alpha # NPM publish option to avoid tag being marked as latest, commonly used are beta, alpha, next, etc.
npm-force-tag: true # NPM enable this will check the prefix of the prerelase version by semver, when tag name not `latest` or `next`
## NPM scoped package access
npm-access: foo
## folder containing package.json, empty will use workspace
npm-folder: .
## fail NPM publish if version already exists in NPM registry
npm-fail-on-version-conflict: true
## disables ssl verification when communicating with the NPM registry.
npm-skip-verify-ssl: true
## Skip npm whoami check
npm-skip-whoami: true
## enable `.npmrc` file write at user home, default .npmrc file will write in `npm-folder`
npm-rc-user-home-enable: true
Content type
Image
Digest
sha256:5683c74d0…
Size
74.5 MB
Last updated
over 1 year ago
docker pull sinlov/woodpecker-npm