Skip to content

Commit

Permalink
generate github release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
aloneguid committed Jun 23, 2023
1 parent e064849 commit efc0e81
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ on:
push:
branches:
- master
- oss-release

pull_request:
branches:
Expand Down Expand Up @@ -58,6 +57,10 @@ jobs:
run: ls -R
working-directory: build

# creates "atf" subdir and put the following:
# 1. msi installer, renamed after version number
# 2. zipped .exe
# 3. version.txt containing version number
- name: prep artifacts
run: |
mkdir atf
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,18 @@ jobs:
workflow: build.yml
workflow_conclusion: success

# https://github.com/softprops/action-gh-release
#- name: create gh release
# uses: softprops/action-gh-release@v1
# if: github.ref == 'refs/heads/master'
# with:
# tag_name: ${{ env.VERSION }}
# name: ${{ env.VERSION }}
# files: |
# bin/*.msi
# bin/*.zip
# generate_release_notes: true

- name: debug
run: ls -R
working-directory: .
31 changes: 31 additions & 0 deletions pre-build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,38 @@ $cppLog = ".\bt\log.h"

$txtLog = ""
$cppStructs = ""
$mdRel = ""

# release notes for github
$md0 = $log[0]
if($md0.new) {
$mdRel += "## New Features`n"
foreach($item in $md0.new) {
$mdRel += "- $item`n"
}
$mdResl += "`n"
}

if($md0.improvements) {
$mdRel += "## Improvements`n"
foreach($item in $md0.improvements) {
$mdRel += "- $item`n"
}
$mdResl += "`n"
}

if($md0.bugs) {
$mdRel += "## Bugs Fixed`n"
foreach($item in $md0.bugs) {
$mdRel += "- $item`n"
}
$mdResl += "`n"
}

Write-Host $md0
$md0 | Out-File release-notes.txt

# text release notes and c++ header file
foreach($lv in $log) {
$txtLog += "$($lv.version) ($($lv.date))`n"
$cppStructs += " change_version {""$($lv.version)"", ""$($lv.date)"",`n";
Expand Down

0 comments on commit efc0e81

Please sign in to comment.