Skip to content

ci: updates the ser env #8

ci: updates the ser env

ci: updates the ser env #8

name: Compile Latex and Release PDF
on:
push:
branches: [ env/r ]
env:
SEMVERBOT_VERSION: "1.0.0"
jobs:
build_latex:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v2
- name: Compile LaTeX document
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: ${current_version}"
echo "next version: ${release_version}"
- name: release version
run: |
sbot release version
sbot push version
- name: Generate Changelog
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
# if: startsWith(github.ref, 'refs/tags/')
with:
generate_release_notes: true
discussion_category_name: "General"
body_path: ${{ github.workspace }}-CHANGELOG.txt
files: |
main.pdf