Skip to content

Commit f089bcc

Browse files
authored
Don't tag dry-run releases (#239)
1 parent 1002b64 commit f089bcc

File tree

4 files changed

+17
-4
lines changed

4 files changed

+17
-4
lines changed

.github/workflows/branch-bump-tag-crates.yml

+1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ jobs:
7878
- uses: eclipse-zenoh/ci/bump-crates@main
7979
with:
8080
repo: ${{ inputs.repo }}
81+
live-run: ${{ inputs.live-run }}
8182
path: ${{ inputs.path }}
8283
version: ${{ steps.create-release-branch.outputs.version }}
8384
branch: ${{ steps.create-release-branch.outputs.branch }}

bump-crates/action.yml

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: Bump crates
33
inputs:
44
version:
55
required: true
6+
live-run:
7+
required: false
68
branch:
79
required: true
810
repo:

dist/bump-crates-main.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -81103,6 +81103,7 @@ _cargo__WEBPACK_IMPORTED_MODULE_4__ = (__webpack_async_dependencies__.then ? (aw
8110381103

8110481104
function setup() {
8110581105
const version = _actions_core__WEBPACK_IMPORTED_MODULE_2__.getInput("version", { required: true });
81106+
const liveRun = _actions_core__WEBPACK_IMPORTED_MODULE_2__.getBooleanInput("live-run", { required: true });
8110681107
const branch = _actions_core__WEBPACK_IMPORTED_MODULE_2__.getInput("branch", { required: true });
8110781108
const repo = _actions_core__WEBPACK_IMPORTED_MODULE_2__.getInput("repo", { required: true });
8110881109
const path = _actions_core__WEBPACK_IMPORTED_MODULE_2__.getInput("path");
@@ -81112,6 +81113,7 @@ function setup() {
8111281113
const bumpDepsBranch = _actions_core__WEBPACK_IMPORTED_MODULE_2__.getInput("bump-deps-branch");
8111381114
return {
8111481115
version,
81116+
liveRun,
8111581117
branch,
8111681118
repo,
8111781119
path: path === "" ? undefined : path,
@@ -81147,8 +81149,10 @@ async function main(input) {
8114781149
});
8114881150
}
8114981151
(0,_command__WEBPACK_IMPORTED_MODULE_3__.sh)(`git push --force ${remote} ${input.branch}`, { cwd: repo });
81150-
(0,_command__WEBPACK_IMPORTED_MODULE_3__.sh)(`git tag --force ${input.version} --message v${input.version}`, { cwd: repo, env: _config__WEBPACK_IMPORTED_MODULE_5__/* .gitEnv */ .B });
81151-
(0,_command__WEBPACK_IMPORTED_MODULE_3__.sh)(`git push --force ${remote} ${input.version}`, { cwd: repo });
81152+
if (input.liveRun) {
81153+
(0,_command__WEBPACK_IMPORTED_MODULE_3__.sh)(`git tag --force ${input.version} --message v${input.version}`, { cwd: repo, env: _config__WEBPACK_IMPORTED_MODULE_5__/* .gitEnv */ .B });
81154+
(0,_command__WEBPACK_IMPORTED_MODULE_3__.sh)(`git push --force ${remote} ${input.version}`, { cwd: repo });
81155+
}
8115281156
(0,_command__WEBPACK_IMPORTED_MODULE_3__.sh)("git log -10", { cwd: repo });
8115381157
(0,_command__WEBPACK_IMPORTED_MODULE_3__.sh)("git show-ref --tags", { cwd: repo });
8115481158
await cleanup(input);

src/bump-crates.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { gitEnv } from "./config";
99

1010
export type Input = {
1111
version: string;
12+
liveRun: boolean;
1213
branch: string;
1314
repo: string;
1415
path?: string;
@@ -20,6 +21,7 @@ export type Input = {
2021

2122
export function setup(): Input {
2223
const version = core.getInput("version", { required: true });
24+
const liveRun = core.getBooleanInput("live-run", { required: true });
2325
const branch = core.getInput("branch", { required: true });
2426
const repo = core.getInput("repo", { required: true });
2527
const path = core.getInput("path");
@@ -30,6 +32,7 @@ export function setup(): Input {
3032

3133
return {
3234
version,
35+
liveRun,
3336
branch,
3437
repo,
3538
path: path === "" ? undefined : path,
@@ -71,8 +74,11 @@ export async function main(input: Input) {
7174
}
7275

7376
sh(`git push --force ${remote} ${input.branch}`, { cwd: repo });
74-
sh(`git tag --force ${input.version} --message v${input.version}`, { cwd: repo, env: gitEnv });
75-
sh(`git push --force ${remote} ${input.version}`, { cwd: repo });
77+
78+
if (input.liveRun) {
79+
sh(`git tag --force ${input.version} --message v${input.version}`, { cwd: repo, env: gitEnv });
80+
sh(`git push --force ${remote} ${input.version}`, { cwd: repo });
81+
}
7682

7783
sh("git log -10", { cwd: repo });
7884
sh("git show-ref --tags", { cwd: repo });

0 commit comments

Comments
 (0)