Skip to content

Commit 8247b99

Browse files
Merge branch 'develop'
2 parents 8b2b3c1 + ae614af commit 8247b99

1 file changed

Lines changed: 7 additions & 13 deletions

File tree

.github/workflows/nbgv_prepare_release.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,12 @@ jobs:
6363
run: test -f "${{ inputs.version_file_path }}"
6464

6565
# 4️⃣ Map "patch" -> "revision" (CLI nomenclature)
66-
#- name: 🔄 Map patch → revision
67-
# id: map
68-
# run: |
69-
# INC="${{ inputs.increment }}"
70-
# [ "$INC" = "patch" ] && INC=revision
71-
# echo "inc=$INC" >> "$GITHUB_OUTPUT"
72-
73-
# 4️⃣ (Optional) You can remove the Map step entirely—
74-
# just use inputs.increment directly.
66+
- name: 🔄 Map patch → revision
67+
id: map
68+
run: |
69+
INC="${{ inputs.increment }}"
70+
[ "$INC" = "patch" ] && INC=revision
71+
echo "inc=$INC" >> "$GITHUB_OUTPUT"
7572
7673
# 5️⃣ Install NBGV CLI once
7774
- name: 🔧 Install NBGV CLI
@@ -81,18 +78,15 @@ jobs:
8178
- name: 🛠️ Prepare release branch
8279
id: prep_release
8380
run: |
84-
# Determine prerelease tag only for non-main branches
8581
TAG_ARG=""
8682
if [[ "${{ inputs.target_branch }}" != "main" && "${{ inputs.target_branch }}" != "master" ]]; then
8783
TAG_ARG="dev" # or whatever prerelease you want
8884
fi
8985
90-
# Use the raw increment input (major|minor|patch)
9186
nbgv prepare-release $TAG_ARG \
92-
--versionIncrement ${{ inputs.increment }} \
87+
--versionIncrement ${{ steps.map.outputs.inc }} \
9388
-p .
9489
95-
# expose the branch name for downstream jobs
9690
echo "branch=$(git rev-parse --abbrev-ref HEAD)" >> "$GITHUB_OUTPUT"
9791
9892

0 commit comments

Comments
 (0)