diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index cc18f75..b6c7bf5 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -387,17 +387,24 @@ jobs: publish: name: Publish runs-on: ubuntu-latest + environment: npm needs: - test-macOS-windows-binding - test-linux-binding steps: - uses: actions/checkout@v4 + - uses: webfactory/ssh-agent@v0.9.0 + with: + ssh-private-key: | + ${{ secrets.HTTP_HANDLER_ACCESS_TOKEN }} + ${{ secrets.HTTP_REWRITER_ACCESS_TOKEN }} - uses: pnpm/action-setup@v4 with: version: latest - uses: actions/setup-node@v4 with: node-version: 20 + registry-url: 'https://registry.npmjs.org' cache: pnpm - name: Install dependencies run: pnpm install @@ -431,18 +438,18 @@ jobs: - name: List packages run: ls -R ./npm shell: bash + - name: Pack + if: ${{ !contains(github.ref, 'main') }} + run: npm pack - name: Publish if: contains(github.ref, 'main') run: | - npm config set //registry.npmjs.org/:_authToken=$NPM_TOKEN - npm config set scope "@platformatic" - # npm config set provenance true if git log -1 --pretty=%B | grep "^v\?[0-9]\+\.[0-9]\+\.[0-9]\+"; then - npm publish --access public --dry-run + npm publish elif git log -1 --pretty=%B | grep "^v\?[0-9]\+\.[0-9]\+\.[0-9]\+-\.+"; then - npm publish --tag next --access public --dry-run + npm publish else echo "Not a release, skipping publish" fi diff --git a/.npmignore b/.npmignore index ec144db..a596928 100644 --- a/.npmignore +++ b/.npmignore @@ -9,5 +9,12 @@ rustfmt.toml yarn.lock *.node .yarn -__test__ +src +test renovate.json +fix-python-soname +artifacts +build.rs +rust-toolchain.toml +CLAUDE.md +Cargo.toml diff --git a/npm/darwin-arm64/package.json b/npm/darwin-arm64/package.json index 1f25c39..b6dacbb 100644 --- a/npm/darwin-arm64/package.json +++ b/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { - "name": "python-node-darwin-arm64", - "version": "0.0.0", + "name": "@platformatic/python-node-darwin-arm64", + "version": "0.0.1", "os": [ "darwin" ], @@ -11,8 +11,13 @@ "files": [ "python-node.darwin-arm64.node" ], + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "restricted", + "scope": "@platformatic" + }, "license": "MIT", "engines": { "node": ">= 10" } -} \ No newline at end of file +} diff --git a/npm/darwin-x64/package.json b/npm/darwin-x64/package.json index 43e8bc9..ed90eec 100644 --- a/npm/darwin-x64/package.json +++ b/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { - "name": "python-node-darwin-x64", - "version": "0.0.0", + "name": "@platformatic/python-node-darwin-x64", + "version": "0.0.1", "os": [ "darwin" ], @@ -11,8 +11,13 @@ "files": [ "python-node.darwin-x64.node" ], + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "restricted", + "scope": "@platformatic" + }, "license": "MIT", "engines": { "node": ">= 10" } -} \ No newline at end of file +} diff --git a/npm/linux-arm64-gnu/package.json b/npm/linux-arm64-gnu/package.json index 26a0b47..c95ab39 100644 --- a/npm/linux-arm64-gnu/package.json +++ b/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { - "name": "python-node-linux-arm64-gnu", - "version": "0.0.0", + "name": "@platformatic/python-node-linux-arm64-gnu", + "version": "0.0.1", "os": [ "linux" ], @@ -16,6 +16,11 @@ "scripts": { "postinstall": "node fix-python-soname.js" }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "restricted", + "scope": "@platformatic" + }, "license": "MIT", "engines": { "node": ">= 10" diff --git a/npm/linux-x64-gnu/package.json b/npm/linux-x64-gnu/package.json index 5769137..358f782 100644 --- a/npm/linux-x64-gnu/package.json +++ b/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { - "name": "python-node-linux-x64-gnu", - "version": "0.0.0", + "name": "@platformatic/python-node-linux-x64-gnu", + "version": "0.0.1", "os": [ "linux" ], @@ -16,6 +16,11 @@ "scripts": { "postinstall": "node fix-python-soname.js" }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "restricted", + "scope": "@platformatic" + }, "license": "MIT", "engines": { "node": ">= 10" @@ -23,4 +28,4 @@ "libc": [ "glibc" ] -} \ No newline at end of file +} diff --git a/package.json b/package.json index 0d7add1..88be460 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@platformatic/python-node", "description": "Run ASGI-compatible Python apps in Node.js", "private": true, - "version": "0.0.0", + "version": "0.1.0", "main": "index.js", "types": "index.d.ts", "napi": { @@ -13,6 +13,11 @@ "x86_64-unknown-linux-gnu" ] }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "restricted", + "scope": "@platformatic" + }, "license": "MIT", "devDependencies": { "@napi-rs/cli": "^3.0.4",