nodejs / node-api-headers

Repository used to make the N-API headers more accessible
MIT License
32 stars 13 forks source link

ci: add support for automated releases #42

Open KevinEady opened 1 month ago

KevinEady commented 1 month ago

Creates two new jobs, prepare-release and publish-release, as discussed in https://github.com/nodejs/node-api-headers/issues/13#issuecomment-2100471529.

The publish-release job requires a CI env secret, NPM_TOKEN, as discussed here: Publishing packages to the npm registry.

The publish-release job is not fully automated, and must be ran manually from the GitHub Actions interface.

This PR also updates sync-headers to close outdated PRs if a new change comes in.

Fixes: #13

KevinEady commented 1 month ago

A test run on my local fork created these artifacts:

KevinEady commented 1 month ago

We discussed in the 17 May Node-API meeting that the manual running of publish-release is acceptable, and in the future, we can make it automated if we see that we continuously run it manually with no problems.

KevinEady commented 5 days ago

I'm moving this back to draft, as the custom release code could be replaced with https://github.com/googleapis/release-please-action similarly to https://github.com/nodejs/node-addon-api/pull/1523.