mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 19:08:15 +00:00
chore: update "version_bump" action to allow for RC bumps (#29048)
Also fixes the script for other version updates that was missed in https://github.com/denoland/deno/pull/29018.
This commit is contained in:
parent
f9a024a748
commit
5c3bb07460
2 changed files with 22 additions and 2 deletions
1
.github/workflows/version_bump.yml
vendored
1
.github/workflows/version_bump.yml
vendored
|
@ -11,6 +11,7 @@ on:
|
|||
- patch
|
||||
- minor
|
||||
- major
|
||||
- rc
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
|
|
|
@ -10,6 +10,25 @@ const denoRtCrate = workspace.getDenoRtCrate();
|
|||
const denoLibCrate = workspace.getDenoLibCrate();
|
||||
const originalCliVersion = cliCrate.version;
|
||||
|
||||
if (Deno.args.some((a) => a === "--rc")) {
|
||||
const cliVersion = semver.parse(cliCrate.version)!;
|
||||
|
||||
if (cliVersion.prerelease[0] != "rc") {
|
||||
cliVersion.increment("minor");
|
||||
}
|
||||
cliVersion.increment("pre", "rc");
|
||||
|
||||
const version = cliVersion.toString();
|
||||
|
||||
await cliCrate.setVersion(version);
|
||||
await denoRtCrate.setVersion(version);
|
||||
await denoLibCrate.setVersion(version);
|
||||
// Force lockfile update
|
||||
await workspace.getCliCrate().cargoUpdate("--workspace");
|
||||
|
||||
Deno.exit(0);
|
||||
}
|
||||
|
||||
await bumpCiCacheVersion();
|
||||
|
||||
// increment the cli version
|
||||
|
@ -23,8 +42,8 @@ if (Deno.args.some((a) => a === "--patch")) {
|
|||
await cliCrate.promptAndIncrement();
|
||||
}
|
||||
|
||||
denoRtCrate.setVersion(cliCrate.version);
|
||||
denoLibCrate.folderPath.join("version.txt").writeTextSync(cliCrate.version);
|
||||
await denoRtCrate.setVersion(cliCrate.version);
|
||||
await denoLibCrate.setVersion(cliCrate.version);
|
||||
|
||||
// increment the dependency crate versions
|
||||
for (const crate of workspace.getCliDependencyCrates()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue