Skip to content

Commit 3d31ef1

Browse files
Merge branch 'develop'
2 parents 47962b0 + 6257d7f commit 3d31ef1

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

.github/workflows/nbgv_prepare_release.yml

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,12 @@ on:
88
type: string
99
default: main
1010
required: true
11-
12-
increment: # major | minor | patch (patch → revision later)
11+
increment:
1312
description: "Version increment"
1413
type: string
1514
default: patch
1615
required: true
17-
18-
version_file_path: # path relative to repo root
16+
version_file_path:
1917
description: "Path to version.json"
2018
type: string
2119
default: version.json
@@ -25,7 +23,6 @@ on:
2523
GH_TOKEN:
2624
description: "GitHub token (falls back to github.token)"
2725
required: false
28-
2926
outputs:
3027
tag_name:
3128
description: "Git tag from Nerdbank"
@@ -44,37 +41,28 @@ jobs:
4441
semver: ${{ steps.version.outputs.semver }}
4542

4643
steps:
47-
# 1️⃣ Checkout the target branch / tag
4844
- name: 📥 Checkout target
4945
uses: actions/checkout@v4
5046
with:
5147
ref: ${{ inputs.target_branch }}
5248
fetch-depth: 0
5349
token: ${{ secrets.GH_TOKEN || github.token }}
5450

55-
# 2️⃣ Install .NET SDK (for the nbgv tool)
5651
- name: ⚙️ Setup .NET 9.x
5752
uses: actions/setup-dotnet@v4
5853
with:
5954
dotnet-version: 9.0.x
6055

61-
# 3️⃣ Ensure version.json exists at the given path
62-
- name: 🔍 Ensure version.json exists
63-
run: test -f "${{ inputs.version_file_path }}"
64-
65-
# 4️⃣ Map "patch" -> "revision" (CLI nomenclature)
6656
- name: 🔄 Map patch → revision
6757
id: map
6858
run: |
6959
INC="${{ inputs.increment }}"
7060
[ "$INC" = "patch" ] && INC=revision
7161
echo "inc=$INC" >> "$GITHUB_OUTPUT"
7262
73-
# 5️⃣ Install the NBGV CLI
7463
- name: 🔧 Install NBGV CLI
7564
run: dotnet tool install -g nbgv --version 3.8.38-alpha
7665

77-
# 6️⃣ Prepare the release branch with an explicit patch bump
7866
- name: 🛠️ Prepare release branch
7967
id: prep_release
8068
run: |
@@ -102,14 +90,12 @@ jobs:
10290
# 4) Expose the branch name for downstream jobs
10391
echo "branch=$(git rev-parse --abbrev-ref HEAD)" >> "$GITHUB_OUTPUT"
10492
105-
# 7️⃣ Resolve the exact tag & SemVer2
10693
- name: 🔖 Resolve tag & SemVer
10794
id: version
10895
run: |
10996
echo "tag=$(nbgv get-version -v GitTagName)" >> "$GITHUB_OUTPUT"
11097
echo "semver=$(nbgv get-version -v SemVer2)" >> "$GITHUB_OUTPUT"
11198
112-
# 8️⃣ Create & push a bootstrap tag the very first time
11399
- name: 🏷️ Bootstrap first tag when repo is tag-less
114100
run: |
115101
if ! git tag --list | grep -q . ; then
@@ -119,7 +105,6 @@ jobs:
119105
git push origin 0.0.0
120106
fi
121107
122-
# 9️⃣ Generate release notes (normal tag-diff mode)
123108
- name: 📝 Generate release notes
124109
id: changelog
125110
uses: mikepenz/release-changelog-builder-action@v5

0 commit comments

Comments
 (0)