You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: New-Release.ps1
+29-13Lines changed: 29 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -3,13 +3,10 @@
3
3
Automates creating a new extension release: prepends release notes to CHANGELOG.md, commits, tags, and creates GitHub release.
4
4
5
5
.DESCRIPTION
6
-
New-Release.ps1 updates CHANGELOG.md by inserting a new version section right after the Unreleased header, commits the change, creates an annotated tag following v<Major>.<Minor>.<Build>[.<Revision>] pattern, and invokes `gh release create` with the provided notes.
7
-
8
-
.PARAMETERVersion
9
-
System.Version representing the new version. Tag format derives from all numeric components present.
6
+
New-Release.ps1 updates CHANGELOG.md by inserting a new version section right after the Unreleased header, commits the change, determines the next semantic version automatically by inspecting existing git tags (pattern: v<Major>.<Minor>.<Build>[.<Revision>]), creates an annotated tag, and invokes `gh release create` with the provided notes.
10
7
11
8
.PARAMETERReleaseNotes
12
-
String containing markdown release notes (can include multiline text). This will be used both for CHANGELOG entry body and GitHub release notes.
9
+
Markdown release notes (multiline supported) used for CHANGELOG body and GitHub release.
13
10
14
11
.PARAMETERDate
15
12
Optional override for release date (YYYY-MM-DD). Defaults to current UTC date.
@@ -21,17 +18,16 @@ If set, does not push commit/tag to origin.
21
18
If set, shows the changes that would be made without applying them.
22
19
23
20
.EXAMPLE
24
-
./New-Release.ps1 -Version 0.0.17 -ReleaseNotes "**Added:** New feature X\n**Fixed:** Bug Y"
Requires `gh` CLI authenticated for release creation; if missing, script will warn and skip release step.
27
+
Requires `gh` CLI authenticated for release creation; if missing, script will warn and skip release step. Version auto-increment strategy: bump patch (Build component). If no existing tags are found, starts at 0.0.1.
-`-Version` (System.Version) – New semantic version (e.g., 0.0.17 or 1.2.3.4). Tag generated as `v<Major>.<Minor>.<Build>[.<Revision>]`.
213
212
-`-ReleaseNotes` (string) – Markdown body inserted into CHANGELOG and used for GitHub release notes.
214
213
-`-Date` (optional) – Override date; defaults to current UTC.
215
214
-`-SkipGitPush` – Create commit + tag locally but do not push.
216
215
-`-DryRun` – Show planned changes without applying.
217
216
217
+
Auto versioning: Script scans existing tags (`git tag --list 'v*'`), parses semantic versions, selects the highest, then increments the patch (Build) component. If no tags exist it starts at `0.0.1`.
218
+
218
219
Behavior:
219
220
220
221
1. Prepends a new `## [Version] - Date` section after `## [Unreleased]` in `CHANGELOG.md`.
0 commit comments