game-algorithms/tools/wasm-pack-plugin/README.md

42 lines
1.1 KiB
Markdown
Raw Normal View History

2022-08-06 20:32:27 +00:00
# wasm-pack plugin
This is a drone/woodpecker plugin for building and publishing wasm-pack packages.
2022-08-07 01:42:36 +00:00
When using this plugin it is best to pull every time since it can be updated often internally.
2022-08-06 20:32:27 +00:00
## Settings
- `actions` (required): Actions (see below) to run
- `folder`: Project folder
- `scope`: NPM package scope
### Build
2022-08-07 16:53:21 +00:00
- `profile` (default=`release`): Build profile to use for `wasm-pack build`
- `target` (default=`bundler`): Target to build for
2022-08-06 20:32:27 +00:00
- `make`: Optionally run a make target building
### Publish
- `username` (required): NPM registry username
- `token` (required): NPM registry auth token (secret recommended)
- `registry` (default=`https://registry.npmjs.org`): NPM registry to publish to
2022-08-07 01:42:36 +00:00
## 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/
2022-08-07 16:53:21 +00:00
```