diff --git a/.github/workflows/javascript.yml b/.github/workflows/javascript.yml index e93b5e1..22c1eb2 100644 --- a/.github/workflows/javascript.yml +++ b/.github/workflows/javascript.yml @@ -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: diff --git a/dist/js/publish/package.json b/dist/js/publish/package.json index 85488f5..ca8940e 100644 --- a/dist/js/publish/package.json +++ b/dist/js/publish/package.json @@ -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" } }