Skip to content

Commit

Permalink
Don't tag dry-run releases (#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzzypixelz authored Oct 23, 2024
1 parent 1002b64 commit f089bcc
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/branch-bump-tag-crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ jobs:
- uses: eclipse-zenoh/ci/bump-crates@main
with:
repo: ${{ inputs.repo }}
live-run: ${{ inputs.live-run }}
path: ${{ inputs.path }}
version: ${{ steps.create-release-branch.outputs.version }}
branch: ${{ steps.create-release-branch.outputs.branch }}
Expand Down
2 changes: 2 additions & 0 deletions bump-crates/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Bump crates
inputs:
version:
required: true
live-run:
required: false
branch:
required: true
repo:
Expand Down
8 changes: 6 additions & 2 deletions dist/bump-crates-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -81103,6 +81103,7 @@ _cargo__WEBPACK_IMPORTED_MODULE_4__ = (__webpack_async_dependencies__.then ? (aw

function setup() {
const version = _actions_core__WEBPACK_IMPORTED_MODULE_2__.getInput("version", { required: true });
const liveRun = _actions_core__WEBPACK_IMPORTED_MODULE_2__.getBooleanInput("live-run", { required: true });
const branch = _actions_core__WEBPACK_IMPORTED_MODULE_2__.getInput("branch", { required: true });
const repo = _actions_core__WEBPACK_IMPORTED_MODULE_2__.getInput("repo", { required: true });
const path = _actions_core__WEBPACK_IMPORTED_MODULE_2__.getInput("path");
Expand All @@ -81112,6 +81113,7 @@ function setup() {
const bumpDepsBranch = _actions_core__WEBPACK_IMPORTED_MODULE_2__.getInput("bump-deps-branch");
return {
version,
liveRun,
branch,
repo,
path: path === "" ? undefined : path,
Expand Down Expand Up @@ -81147,8 +81149,10 @@ async function main(input) {
});
}
(0,_command__WEBPACK_IMPORTED_MODULE_3__.sh)(`git push --force ${remote} ${input.branch}`, { cwd: repo });
(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 });
(0,_command__WEBPACK_IMPORTED_MODULE_3__.sh)(`git push --force ${remote} ${input.version}`, { cwd: repo });
if (input.liveRun) {
(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 });
(0,_command__WEBPACK_IMPORTED_MODULE_3__.sh)(`git push --force ${remote} ${input.version}`, { cwd: repo });
}
(0,_command__WEBPACK_IMPORTED_MODULE_3__.sh)("git log -10", { cwd: repo });
(0,_command__WEBPACK_IMPORTED_MODULE_3__.sh)("git show-ref --tags", { cwd: repo });
await cleanup(input);
Expand Down
10 changes: 8 additions & 2 deletions src/bump-crates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { gitEnv } from "./config";

export type Input = {
version: string;
liveRun: boolean;
branch: string;
repo: string;
path?: string;
Expand All @@ -20,6 +21,7 @@ export type Input = {

export function setup(): Input {
const version = core.getInput("version", { required: true });
const liveRun = core.getBooleanInput("live-run", { required: true });
const branch = core.getInput("branch", { required: true });
const repo = core.getInput("repo", { required: true });
const path = core.getInput("path");
Expand All @@ -30,6 +32,7 @@ export function setup(): Input {

return {
version,
liveRun,
branch,
repo,
path: path === "" ? undefined : path,
Expand Down Expand Up @@ -71,8 +74,11 @@ export async function main(input: Input) {
}

sh(`git push --force ${remote} ${input.branch}`, { cwd: repo });
sh(`git tag --force ${input.version} --message v${input.version}`, { cwd: repo, env: gitEnv });
sh(`git push --force ${remote} ${input.version}`, { cwd: repo });

if (input.liveRun) {
sh(`git tag --force ${input.version} --message v${input.version}`, { cwd: repo, env: gitEnv });
sh(`git push --force ${remote} ${input.version}`, { cwd: repo });
}

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

0 comments on commit f089bcc

Please sign in to comment.