Skip to content

Commit 054d600

Browse files
committed
make GH release
1 parent 4f34a6b commit 054d600

File tree

2 files changed

+18
-43
lines changed

2 files changed

+18
-43
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,14 +194,21 @@ jobs:
194194
git status
195195
196196
- name: Update Changelog
197+
id: changelog
197198
if: needs.build.outputs.is_production_release == 'true'
198199
shell: pwsh
199200
run: |
200201
$newHeading = "# [vNext]$([Environment]::NewLine)$([Environment]::NewLine)## Improvements:$([Environment]::NewLine)$([Environment]::NewLine)## Bug fixes:$([Environment]::NewLine)$([Environment]::NewLine)*Contributors of this release (in alphabetical order):* $([Environment]::NewLine)$([Environment]::NewLine)"
201202
$releaseDate = [System.DateTime]::Today.ToString("yyyy-MM-dd")
202-
$newHeading = $newHeading + "# ${{ needs.build.outputs.product_full_version }} - $releaseDate"
203+
$releaseTitle = "v${{ needs.build.outputs.product_full_version }} - $releaseDate"
204+
$newHeading = $newHeading + "# $releaseTitle"
203205
$content = [System.IO.File]::ReadAllText("CHANGELOG.md").Replace("# [vNext]",$newHeading)
204206
[System.IO.File]::WriteAllText("CHANGELOG.md", $content)
207+
$match = [System.Text.RegularExpressions.Regex]::Match($content, "(?ms)^# .*?^# (?<title>[^\r\n]*?)\s*$\s*(?<notes>.*?)\s*(?:^# |\Z)")
208+
$releaseNotes = $(if ($match.Success) { $match.Groups["notes"].Value } else { "N/A" })
209+
[System.IO.File]::WriteAllText("release_notes.txt", $releaseNotes)
210+
Write-Output "release_title=$releaseTitle" >> $env:GITHUB_OUTPUT
211+
Write-Output "release_notes_file=release_notes.txt" >> $env:GITHUB_OUTPUT
205212
206213
- name: Update changes in GitHub repository
207214
if: needs.build.outputs.is_production_release == 'true'
@@ -212,4 +219,12 @@ jobs:
212219
git push origin tag v${{ needs.build.outputs.product_full_version }}
213220
git add -u
214221
git commit -m '[automated commit] bump version after release of ${{ needs.build.outputs.product_full_version }}'
215-
git push
222+
git push
223+
224+
- name: Create GitHub Release
225+
if: needs.build.outputs.is_production_release == 'true'
226+
run: |
227+
gh release create "v${{ needs.build.outputs.product_full_version }}" \
228+
--verify-tag \
229+
--title="${{ steps.changelog.outputs.release_title }}" \
230+
--notes-file="${{ steps.changelog.outputs.release_notes_file }}"

CHANGELOG.md

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2,51 +2,11 @@
22

33
## Improvements:
44

5-
## Bug fixes:
6-
7-
*Contributors of this release (in alphabetical order):*
8-
9-
# 2.1.4 - 2024-10-16
10-
11-
## Improvements:
12-
13-
## Bug fixes:
14-
15-
*Contributors of this release (in alphabetical order):*
16-
17-
# 2.1.3 - 2024-10-16
18-
19-
## Improvements:
20-
21-
## Bug fixes:
22-
23-
*Contributors of this release (in alphabetical order):*
24-
25-
# 2.1.2 - 2024-10-16
26-
27-
## Improvements:
28-
29-
## Bug fixes:
30-
31-
*Contributors of this release (in alphabetical order):*
32-
33-
# 2.1.2 - 2024-10-16
34-
35-
## Improvements:
36-
37-
## Bug fixes:
38-
39-
*Contributors of this release (in alphabetical order):*
40-
41-
# 2.1.2-ci20241016-44 - 2024-10-16
42-
43-
## Improvements:
44-
455
* Support DateTimeOffset in value comparer (#180)
466

477
## Bug fixes:
488

49-
* Fix: Rule Backgounds cause External Data Plugin to fail (#271)
9+
* Fix: Rule Backgounds cause "External Data Plugin" to fail (#271)
5010

5111
*Contributors of this release (in alphabetical order): @obligaron*
5212

0 commit comments

Comments
 (0)