Create Release #6
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
# This manually started workflow builds PDFs and eBooks and creates a new release with these assets. | |
name: "Create Release" | |
on: | |
workflow_dispatch: # manual triggering | |
inputs: | |
version_number: | |
description: "Version number" | |
required: true | |
default: "v1.2.9" | |
version_text: | |
description: "Description" | |
required: true | |
default: "" | |
jobs: | |
release: | |
runs-on: ubuntu-22.04 | |
steps: | |
# - name: test print | |
# run: | | |
# echo "version_number: ${{ github.event.inputs.version_number }}" | |
# echo "version_number: ${{ github.event.inputs.version_text }}" | |
# steps are copied from make.yml | |
- name: checkout repository | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
fetch-depth: 1 # 0 if you want to push to repo | |
- name: caching LaTeX files | |
uses: actions/cache@v4 | |
with: | |
path: | | |
chapters/*.aux | |
hpmor*.aux | |
hpmor*.fdb_latexmk | |
hpmor*.fls | |
hpmor*.out | |
hpmor*.pdf | |
hpmor*.toc | |
hpmor*.xdv | |
key: tex-cache | |
- name: python set up | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
# cache: "pip" | |
- name: python cache set up | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.pythonLocation }} | |
key: ${{ env.pythonLocation }}-py-cache | |
- name: check chapters for known issues | |
run: python3 scripts/check_chapters.py | |
- name: check pre-commit tests | |
uses: pre-commit/action@v3.0.1 | |
- name: install requirements | |
run: sh scripts/install_requirements.sh > /dev/null | |
- name: make PDFs | |
run: sh scripts/make_pdfs.sh > /dev/null | |
- name: make eBooks | |
run: sh scripts/make_ebooks.sh | |
- name: publish release | |
uses: softprops/action-gh-release@v2 | |
with: | |
tag_name: "${{ inputs.version_number }}" | |
body: "${{ inputs.version_text }}" | |
prerelease: false | |
files: | | |
./hpmor*.pdf | |
./hpmor.epub | |
./hpmor.mobi | |
./hpmor.fb2 |