Skip to content

Commit e60750c

Browse files
Update nbgv_prepare_release.yml
1 parent 0ffe1be commit e60750c

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

.github/workflows/nbgv_prepare_release.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,18 @@ jobs:
8181
id: prepare
8282
run: |
8383
cd "$GITHUB_WORKSPACE"
84-
8584
git config user.name "release-bot"
8685
git config user.email "release-bot@users.noreply.github.com"
87-
88-
# Use --project . to point at the root (where your version.json lives)
89-
# and pass your increment directly.
90-
dotnet nbgv prepare-release \
91-
--project . \
92-
--versionIncrement ${{ inputs.increment }}
93-
86+
87+
INC=${{ inputs.increment }}
88+
case "$INC" in
89+
major) FLAGS="--versionIncrement major" ;;
90+
minor) FLAGS="--versionIncrement minor" ;;
91+
patch) FLAGS="" ;;
92+
*) echo "Invalid increment: $INC" && exit 1 ;;
93+
esac
94+
95+
dotnet nbgv prepare-release --project . $FLAGS
9496
echo "release_branch=$(git rev-parse --abbrev-ref HEAD)" >> "$GITHUB_OUTPUT"
9597

9698
# 4️⃣ Push branches & tags; open draft PR back to target_branch

0 commit comments

Comments
 (0)