plugin type fix and readme
ci/woodpecker/push/tools-wasm-pack-plugin Pipeline was successful Details
ci/woodpecker/push/wasm-o-x-rust Pipeline was successful Details

This commit is contained in:
Gleb Koval 2022-08-07 01:42:36 +00:00
parent 3b525b7819
commit 23ff65fb6d
Signed by: cyclane
GPG Key ID: 15E168A8B332382C
2 changed files with 21 additions and 1 deletions

View File

@ -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/
```

View File

@ -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}