mirror of
https://github.com/hexedtech/codemp.git
synced 2024-12-22 21:04:53 +01:00
ci(js): publish natives under @codemp scope...
... but keep using just codemp for package. to do this, we sed @codemp/native into just codemp before doing npm publish, because napi doesnt seem to have a flag to configure that without resorting to package.json while creating subdirs.
This commit is contained in:
parent
003711c9c0
commit
decbda1bc8
2 changed files with 10 additions and 5 deletions
7
.github/workflows/javascript.yml
vendored
7
.github/workflows/javascript.yml
vendored
|
@ -66,7 +66,7 @@ jobs:
|
|||
with:
|
||||
path: dist/js/publish/artifacts
|
||||
pattern: codemp-js-*
|
||||
- run: tree; npx napi artifacts; tree
|
||||
- run: npx napi artifacts
|
||||
working-directory: dist/js/publish
|
||||
- run: npx napi prepublish -t . --skip-gh-release
|
||||
working-directory: dist/js/publish
|
||||
|
@ -74,6 +74,11 @@ jobs:
|
|||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
- run: rm -rf *.node artifacts node_modules
|
||||
working-directory: dist/js/publish
|
||||
# TODO this is a bit awful, but napi just appends the platform triplet to the resulting package name
|
||||
# however we want '@codemp/native-...' and 'codemp' (because otherwise it gets flagged as spam)
|
||||
# so we just sed out before releasing. this is really ugly but if it works right now i'll just
|
||||
# take it and think again about it later
|
||||
- run: sed -i 's/"@codemp\/native"/"codemp"/' package.json
|
||||
- run: npm publish
|
||||
working-directory: dist/js/publish
|
||||
env:
|
||||
|
|
8
dist/js/publish/package.json
vendored
8
dist/js/publish/package.json
vendored
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "codemp",
|
||||
"name": "@codemp/native",
|
||||
"version": "0.0.6",
|
||||
"devDependencies": {
|
||||
"@napi-rs/cli": "^2.18.4"
|
||||
|
@ -8,8 +8,8 @@
|
|||
"name": "codemp"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"codemp-win32-x64-msvc": "0.0.4",
|
||||
"codemp-darwin-arm64": "0.0.4",
|
||||
"codemp-linux-x64-gnu": "0.0.4"
|
||||
"@codemp/native-win32-x64-msvc": "0.0.4",
|
||||
"@codemp/native-darwin-arm64": "0.0.4",
|
||||
"@codemp/native-linux-x64-gnu": "0.0.4"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue