plugin type fix and readme
This commit is contained in:
parent
3b525b7819
commit
23ff65fb6d
|
@ -2,6 +2,9 @@
|
||||||
|
|
||||||
This is a drone/woodpecker plugin for building and publishing wasm-pack packages.
|
This is a drone/woodpecker plugin for building and publishing wasm-pack packages.
|
||||||
|
|
||||||
|
When using this plugin it is best to pull every time since it can be updated often internally.
|
||||||
|
|
||||||
|
|
||||||
## Settings
|
## Settings
|
||||||
|
|
||||||
- `actions` (required): Actions (see below) to run
|
- `actions` (required): Actions (see below) to run
|
||||||
|
@ -18,3 +21,20 @@ This is a drone/woodpecker plugin for building and publishing wasm-pack packages
|
||||||
- `username` (required): NPM registry username
|
- `username` (required): NPM registry username
|
||||||
- `token` (required): NPM registry auth token (secret recommended)
|
- `token` (required): NPM registry auth token (secret recommended)
|
||||||
- `registry` (default=`https://registry.npmjs.org`): NPM registry to publish to
|
- `registry` (default=`https://registry.npmjs.org`): NPM registry to publish to
|
||||||
|
|
||||||
|
## Example
|
||||||
|
Taken from [wasm-o-x-rust.yml](../../.woodpecker/wasm-o-x-rust.yml)
|
||||||
|
```yaml
|
||||||
|
pipeline:
|
||||||
|
build and publish:
|
||||||
|
image: git.koval.net/cyclane/game-algorithms/wasm-pack-plugin
|
||||||
|
pull: true
|
||||||
|
settings:
|
||||||
|
actions: build,publish
|
||||||
|
folder: wasm/o-x-rust
|
||||||
|
scope: game-algorithms
|
||||||
|
username: cyclane
|
||||||
|
token:
|
||||||
|
from_secret: DEPLOY_TOKEN
|
||||||
|
registry: https://git.koval.net/api/packages/cyclane/npm/
|
||||||
|
```
|
|
@ -34,7 +34,7 @@ if [[ "${PLUGIN_ACTIONS}" =~ '(^|,)build(,|$)' ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${PLUGIN_ACTIONS}" =~ '(^|,)publish(,|$)' ]]; then
|
if [[ "${PLUGIN_ACTIONS}" =~ '(^|,)publish(,|$)' ]]; then
|
||||||
REGISTY=${PLUGIN_REGISTRY:-https://registry.npmjs.org/}
|
REGISTRY=${PLUGIN_REGISTRY:-https://registry.npmjs.org/}
|
||||||
|
|
||||||
if [ "${PLUGIN_SCOPE:-}" = "" ]; then
|
if [ "${PLUGIN_SCOPE:-}" = "" ]; then
|
||||||
npm config set registry ${REGISTRY}
|
npm config set registry ${REGISTRY}
|
||||||
|
|
Loading…
Reference in New Issue