Skip to content

Commit

Permalink
workflow: automatically generate changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
ayufan committed Oct 14, 2023
1 parent 8a81fb2 commit 154e0ab
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/build_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ jobs:
shell: bash
run: |
majorVer=$(cat VERSION)
lastReleasedVer=$(git tag --sort version:refname --list "v$majorVer.*" | tail -n1)
lastVer=$(git tag --sort version:refname --list "v$majorVer.*" | tail -n1)
if [[ -n "$lastVer" ]]; then
newVer=(${lastVer//./ })
Expand All @@ -85,9 +86,15 @@ jobs:
nextVer="v$majorVer.0"
fi
echo "MajorVer=$majorVer LastVer=$lastVer NextVer=$nextVer"
echo "GIT_LAST_VERSION=${lastReleasedVer//v/}" >> $GITHUB_ENV
echo "GIT_VERSION=${nextVer//v/}" >> $GITHUB_ENV
- name: Fix RELEASE.md version
run: sed -i 's|#{GIT_VERSION}|${{ env.GIT_VERSION }}|g' RELEASE.md
- name: Generate RELEASE details
run: |
echo "# Release ${{ env.GIT_VERSION }}" > RELEASE.tmp
echo "" >> RELEASE.tmp
git log --pretty="- %s (%h)" "${{ env.GIT_LAST_VERSION }}..HEAD" >> RELEASE.tmp
echo "" >> RELEASE.tmp
cat RELEASE.md >> RELEASE.tmp
- name: 'Release debian files'
uses: ncipollo/release-action@v1
with:
Expand All @@ -96,4 +103,4 @@ jobs:
updateOnlyUnreleased: true
generateReleaseNotes: true
prerelease: true
bodyFile: RELEASE.md
bodyFile: RELEASE.tmp
4 changes: 0 additions & 4 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# Release #{GIT_VERSION}

- debian: support bookworm compilation

## Variants

Download correct version for your platform:
Expand Down

0 comments on commit 154e0ab

Please sign in to comment.