Skip to content

Commit

Permalink
ci: updates release action
Browse files Browse the repository at this point in the history
ci: updates the ser env

ci: updates the ser env

ci: updates the ser env

ci: updates the ser env

ci: updates the ser env
  • Loading branch information
Dele Omotosho committed Sep 2, 2023
1 parent 51e44ab commit 38a4dcb
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/compileandrelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ name: Compile Latex and Release PDF

on:
push:
branches: [ env/r ]
branches: [ main ]

env:
SEMVERBOT_VERSION: "1.0.0"

jobs:
build_latex:
Expand All @@ -15,29 +18,36 @@ jobs:
uses: xu-cheng/latex-action@v2
with:
root_file: main.tex

- name: set up sbot path
run: |
mkdir bin
echo "$(pwd)/bin" >> $GITHUB_PATH
- 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=v${current_version}" >> $GITHUB_ENV
echo "RELEASE_VERSION=v${release_version}" >> $GITHUB_ENV
echo "current version: ${current_version}"
echo "next version: ${release_version}"
echo "current version: v${current_version}"
echo "next version: v${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
run: git log ${{ env.CURRENT_VERSION }}..${{ env.RELEASE_VERSION }} --pretty=%s --first-parent > ${{ github.workspace }}-CHANGELOG.txt

- name: Create Release
uses: softprops/action-gh-release@v1
Expand Down

0 comments on commit 38a4dcb

Please sign in to comment.