Skip to content

Commit c3e3d11

Browse files
committed
ci: Change release to support minor|patch
We shouldn't support specifying *arbitrary* versions to try to release, only bump the minor or patch from what's there. This avoids any ability to mess things up. Signed-off-by: Colin Walters <[email protected]>
1 parent 563b7a0 commit c3e3d11

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

.github/workflows/scheduled-release.yml

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
workflow_dispatch:
1010
inputs:
1111
version:
12-
description: 'Version to release (e.g., 1.5.1). Leave empty to auto-increment.'
12+
description: 'Version type to release, either "minor" (default) or "patch" for just a bugfix release'
1313
required: false
1414
type: string
1515

@@ -88,20 +88,9 @@ jobs:
8888
dnf -y install go-md2man
8989
cargo install cargo-edit
9090
91-
# If version is provided via workflow dispatch, validate and use it
92-
if [ -n "$INPUT_VERSION" ]; then
93-
VERSION="$INPUT_VERSION"
94-
# Validate version format strictly
95-
if ! echo "$VERSION" | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' >/dev/null; then
96-
echo "Error: Invalid version format. Expected X.Y.Z (e.g., 1.5.1)"
97-
exit 1
98-
fi
99-
cargo set-version --manifest-path crates/lib/Cargo.toml --package bootc-lib "$VERSION"
100-
else
101-
# default to bump the minor since that is most common
102-
cargo set-version --manifest-path crates/lib/Cargo.toml --package bootc-lib --bump minor
103-
VERSION=$(cargo read-manifest --manifest-path crates/lib/Cargo.toml | jq -r '.version')
104-
fi
91+
# Default to bumping a minor
92+
cargo set-version --manifest-path crates/lib/Cargo.toml --package bootc-lib --bump ${INPUT_VERSION:-minor}
93+
VERSION=$(cargo read-manifest --manifest-path crates/lib/Cargo.toml | jq -r '.version')
10594
10695
cargo update --workspace
10796
cargo xtask update-generated

0 commit comments

Comments
 (0)