Skip to content

Commit aeb562b

Browse files
committed
update inky publish
1 parent 57f3f98 commit aeb562b

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,10 @@ jobs:
233233
run: |
234234
tar xzf inky-wasm-nodejs.tar.gz
235235
cd node
236-
# Add repository field required for npm provenance/OIDC
236+
# wasm-pack generates package.json with crate name — fix for npm
237237
node -e "
238238
const pkg = require('./package.json');
239+
pkg.name = 'inky';
239240
pkg.repository = { type: 'git', url: 'https://github.com/foundation/inky.git' };
240241
require('fs').writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n');
241242
"

bin/publish.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,15 @@ if confirm " Publish to npm?"; then
100100
echo " Extracting to bindings/node/..."
101101
tar -xzf "$TMPDIR/inky-wasm-nodejs.tar.gz" -C bindings/node/
102102
rm -rf "$TMPDIR"
103-
echo " Publishing..."
103+
echo " Patching package.json..."
104104
cd bindings/node
105+
node -e "
106+
const pkg = require('./package.json');
107+
pkg.name = 'inky';
108+
pkg.repository = { type: 'git', url: 'https://github.com/foundation/inky.git' };
109+
require('fs').writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n');
110+
"
111+
echo " Publishing..."
105112
# Use --tag beta for prerelease versions, --tag latest for stable
106113
# --access public is required for first publish of scoped/new packages
107114
if echo "$VERSION" | grep -qE '(alpha|beta|rc|dev)'; then

bindings/node/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
"type": "git",
1515
"url": "https://github.com/foundation/inky.git"
1616
}
17-
}
17+
}

0 commit comments

Comments
 (0)