ci: modernize test-and-release workflow#197
Conversation
- Drop [skip ci] guards, add id-token/contents permissions for OIDC + release publishing - Bump actions/checkout to v7, actions/setup-node to v6, drop Node <22 (use 24 for lint/deploy, [22, 24] for tests) - Replace deprecated ::set-output with $GITHUB_OUTPUT - Switch npm publishing to OIDC trusted publishing, drop NPM_TOKEN - Replace actions/create-release@v1 with softprops/action-gh-release@v3
The previous attempt failed because the vendored @yarnpkg/plugin-changed build (from Dcard/yarn-plugins v0.7.2) used Clipanion's old decorator API (@command.String() etc.), which Yarn 4's bundled Clipanion no longer supports ("Command.String is not a function"). zwave-js hit the same issue migrating to Yarn 4 and fixed it upstream in their yarn-plugins fork by porting the plugin to Clipanion's Option.* API (zwave-js/yarn-plugins@e103f80), then publishing a prebuilt bundle. Point this repo's plugin-changed entry at that maintained bundle instead. Also removes plugin-workspace-tools/interactive-tools/version, which Yarn 4 now ships as builtins.
|
Followed up on the Yarn Berry bump that was reverted above. Root cause: this repo's vendored zwave-js hit the exact same thing migrating to Yarn 4 and fixed it in zwave-js/yarn-plugins by porting the plugin to Clipanion's
|
Modernizes the CI/release workflow, bringing it up to the pattern already rolled out in AlCalzone/jsonl-db, zwave-js/waddle and AlCalzone/node-coap-client.
[skip ci]conditionals on all jobspermissions: id-token: write+contents: writefor OIDC trusted publishing and GitHub releasesactions/checkoutto v7 andactions/setup-nodeto v6[22, 24]::set-outputwith the$GITHUB_OUTPUTfile patternyarn workspaces foreach --all -vti --no-private npm publish --tolerate-republish $TAG), removing theNPM_TOKEN-basedyarn config set npmAuthTokenstepactions/create-release@v1withsoftprops/action-gh-release@v3github.actor == 'AlCalzone'deploy guardNote: the Yarn Berry bump from 3.2.0 to 4.17.0 was attempted per the standard rollout, but
yarn installfailed under 4.17.0 due to an incompatibility in the third-party@yarnpkg/plugin-changedplugin (Command.String is not a function, a Clipanion API change). That bump was reverted;packageManagerstays atyarn@3.2.0for now. Only the workflow-file modernization is included in this PR.