diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5828192..56d2e12 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -141,6 +141,8 @@ jobs: name: prebuild-${{ matrix.dir }} path: prebuilds/ + # npm trusted publishing: npm accepts this workflow's OIDC token instead of an npm token, and adds + # provenance. The package's npm settings must name kecsou/wmctrljs and ci.yml as trusted publisher. publish: if: startsWith(github.ref, 'refs/tags/v') needs: [linux, freebsd, others] @@ -152,7 +154,7 @@ jobs: - uses: actions/checkout@v7 - uses: actions/setup-node@v7 with: - node-version: 22 + node-version: 24 # trusted publishing needs npm 11.5.1+ registry-url: https://registry.npmjs.org - uses: actions/download-artifact@v8 with: @@ -164,6 +166,4 @@ jobs: path: prebuilds merge-multiple: true - run: test "$(ls prebuilds/*/wmctrljs.node | wc -l)" -eq 15 - - run: npm publish --provenance --access public - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - run: npm publish --access public diff --git a/README.md b/README.md index ffbaf9c..2aa3ed4 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ Three suites guard against regressions: - `api.test`: exports, argument validation and error messages of every function, and the binary loader. Runs without X. - `x11.test`: every function against a real window manager. It spawns its own fixture windows (`native/examples/fixture.rs`) and only ever acts on those. It is skipped when `DISPLAY` is unset, and its second-screen tests when `WMCTRLJS_SCREEN1` (a display string for screen 1 of the same server, with its own window manager) is unset. -CI builds and tests the 15 targets above, and publishes to npm when a `v*` tag is pushed. +CI builds and tests the 15 targets above, and publishes to npm when a `v*` tag is pushed, through npm trusted publishing (no npm token: the package's npm settings name this repository's `ci.yml` as trusted publisher). ## Window diff --git a/package.json b/package.json index 132de4f..c832556 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/Kmynes/wmctrljs.git" + "url": "git+https://github.com/kecsou/wmctrljs.git" }, "keywords": [ "wmctrl", @@ -31,9 +31,9 @@ "author": "kevin.voyer.developpeur@gmail.com", "license": "ISC", "bugs": { - "url": "https://github.com/Kmynes/wmctrljs/issues" + "url": "https://github.com/kecsou/wmctrljs/issues" }, - "homepage": "https://github.com/Kmynes/wmctrljs#readme", + "homepage": "https://github.com/kecsou/wmctrljs#readme", "os": [ "linux", "freebsd",