docs: update the download link #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Compile Latex and Release PDF | |
on: | |
push: | |
branches: [ main ] | |
env: | |
SEMVERBOT_VERSION: "1.0.0" | |
jobs: | |
build_latex: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Git repository | |
uses: actions/checkout@v2 | |
- 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=v${current_version}" >> $GITHUB_ENV | |
echo "RELEASE_VERSION=v${release_version}" >> $GITHUB_ENV | |
echo "current version: v${current_version}" | |
echo "next version: v${release_version}" | |
- name: Compile LaTeX document | |
uses: xu-cheng/latex-action@v2 | |
with: | |
root_file: main.tex | |
- 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: | |
tag_name: ${{ env.RELEASE_VERSION }} | |
generate_release_notes: true | |
discussion_category_name: "General" | |
body_path: ${{ github.workspace }}-CHANGELOG.txt | |
files: | | |
main.pdf | |
- name: Notify Beta Readers | |
uses: fjogeleit/http-request-action@v1 | |
with: | |
url: 'https://connect.pabbly.com/workflow/sendwebhookdata/IjU3NjUwNTZmMDYzNzA0MzM1MjY1NTUzZDUxMzQi_pc' | |
method: 'POST' | |
customHeaders: '{"Content-Type": "application/json"}' | |
data: '{"releaseURL": "https://github.com/deletosh/book-CodingForBusyPros/releases/tag/${{ env.RELEASE_VERSION }}", "version" : "${{ env.RELEASE_VERSION }}" }' |