Skip to content

Commit

Permalink
ci: add update with release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dele Omotosho committed Sep 1, 2023
1 parent 59c9f4f commit 51e44ab
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions .github/workflows/compileandrelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ name: Compile Latex and Release PDF

on:
push:
tags:
- '*.*.*'
branches: [ env/r ]

jobs:
build_latex:
Expand All @@ -16,12 +15,36 @@ jobs:
uses: xu-cheng/latex-action@v2
with:
root_file: main.tex
- name: install semverbot
run: |
curl -o bin/sbot -L https://github.com/restechnica/semverbot/releases/download/v$SEMVERBOT_VERSION/sbot-linux-amd64
chmod +x bin/sbot
- name: update version
run: |
sbot update version
current_version="$(sbot get version)"
release_version="$(sbot predict version -m patch)"
echo "CURRENT_VERSION=${current_version}" >> $GITHUB_ENV
echo "RELEASE_VERSION=${release_version}" >> $GITHUB_ENV
echo "current version: ${current_version}"
echo "next version: ${release_version}"
- name: release version
run: |
sbot release version
sbot push version
- name: Generate Changelog
run: git log "$CURRENT_VERSION"..."$RELEASE_VERSION" --pretty=%s --first-parent > ${{ github.workspace }}-CHANGELOG.txt

- name: Create Release
uses: softprops/action-gh-release@v1
# if: startsWith(github.ref, 'refs/tags/')
with:
generate_release_notes: true
discussion_category_name: "General"
body_path: ${{ github.workspace }}-CHANGELOG.txt
files: |
main.pdf

0 comments on commit 51e44ab

Please sign in to comment.