Use crates.io Trusted publishing to publish releases to crates.io - #678
Conversation
Let's continue the discussion from #677 here. If we switch to consistently using crates.io releases, then technically we don't need to build and release a prebuilt version of mozjs-sys for every commit on main, but just for every published release. I've been wondering about the versioning too - perhaps we should just use a workspace version (following the spidermonkey version, as we already do for mozjs-sys), and not version mozjs independently? That would make version bumps simpler, and we could always just release both libraries. It would be a bit wasteful (in terms of crates.io space usage) if mozjs-sys didn't actually change though. |
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
d5c11af to
c52dc84
Compare
That's what we are actually already doing. New releases are not created per commit, but per mozjs-sys bumps (which are enforced by CI due to artifacts).
I give this more though and if think current rules are good enough (CI enforced bumps of mozjs-sys) and manually handled bumps of mozjs. Alternatively we could enforce bumps of mozjs too, but they should remain independent of mozjs-sys. Although common versioning schema does sound nice, if would allow independent releases of mozjs. |
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
46daba6 to
50a5b79
Compare
|
@jdm As a crates.io owner you would need to do the following:
|
|
crates.io has been updated! |
Depends on #676 and #677
See the official crates.io trusted publishing documentation.
This requires a crates.io owner of mozjs to allow trusted-publishing!