Skip to content

Commit

Permalink
chore: publish to npm
Browse files Browse the repository at this point in the history
  • Loading branch information
g-plane committed Aug 29, 2024
1 parent ecd1410 commit c471a26
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,13 @@ jobs:
cargo publish -p pretty_yaml
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- uses: actions/setup-node@v4
with:
registry-url: "https://registry.npmjs.org"
- name: Publish npm package
run: |
cp target/wasm32-unknown-unknown/release/dprint_plugin_yaml.wasm dprint_plugin/deployment/npm/plugin.wasm
cd dprint_plugin/deployment/npm
npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/target
dprint_plugin/deployment/plugin.wasm
dprint_plugin/deployment/npm/plugin.wasm
docs/book
20 changes: 20 additions & 0 deletions dprint_plugin/deployment/npm/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "dprint-plugin-yaml",
"description": "Pretty YAML as dprint plugin.",
"version": "0.5.0",
"author": "Pig Fang <[email protected]>",
"repository": "g-plane/pretty_yaml",
"license": "MIT",
"type": "module",
"keywords": [
"dprint",
"dprint-plugin"
],
"files": [
"*.wasm"
],
"exports": {
"./plugin.wasm": "./plugin.wasm",
"./package.json": "./package.json"
}
}

0 comments on commit c471a26

Please sign in to comment.