From 23ff65fb6d11aa8ee68e64fa0a5f7414e271f334 Mon Sep 17 00:00:00 2001 From: Gleb Koval Date: Sun, 7 Aug 2022 01:42:36 +0000 Subject: [PATCH] plugin type fix and readme --- tools/wasm-pack-plugin/README.md | 20 ++++++++++++++++++++ tools/wasm-pack-plugin/plugin.sh | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/tools/wasm-pack-plugin/README.md b/tools/wasm-pack-plugin/README.md index 1793c1e..51827cf 100644 --- a/tools/wasm-pack-plugin/README.md +++ b/tools/wasm-pack-plugin/README.md @@ -2,6 +2,9 @@ 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 - `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 - `token` (required): NPM registry auth token (secret recommended) - `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/ +``` \ No newline at end of file diff --git a/tools/wasm-pack-plugin/plugin.sh b/tools/wasm-pack-plugin/plugin.sh index 7e26396..dea70b3 100755 --- a/tools/wasm-pack-plugin/plugin.sh +++ b/tools/wasm-pack-plugin/plugin.sh @@ -34,7 +34,7 @@ if [[ "${PLUGIN_ACTIONS}" =~ '(^|,)build(,|$)' ]]; then fi if [[ "${PLUGIN_ACTIONS}" =~ '(^|,)publish(,|$)' ]]; then - REGISTY=${PLUGIN_REGISTRY:-https://registry.npmjs.org/} + REGISTRY=${PLUGIN_REGISTRY:-https://registry.npmjs.org/} if [ "${PLUGIN_SCOPE:-}" = "" ]; then npm config set registry ${REGISTRY}