Skip to content

Commit

Permalink
Caching for create-release.yml and minor changes to make.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
entorb committed Apr 3, 2024
1 parent da307ba commit 9200b7a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 18 deletions.
30 changes: 21 additions & 9 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# This manually started workflow builds PDFs and eBooks and creates a new release with these assets.
# Build part is copied from make.yml .

name: "Create Release"

on:
workflow_dispatch:
workflow_dispatch: # manual triggering
inputs:
version_number:
description: "Version number"
Expand All @@ -27,28 +25,42 @@ jobs:

# steps are copied from make.yml

- name: Checkout repository
- name: checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 1 # 0 if you want to push to repo

- name: Python set up
- 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
- name: python cache set up
uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-py-cache

- name: Check of chapters for known issues
- name: check chapters for known issues
run: python3 scripts/check_chapters.py

- name: Check pre-commit tests
- name: check pre-commit tests
uses: pre-commit/[email protected]

- name: install requirements
Expand All @@ -60,7 +72,7 @@ jobs:
- name: make eBooks
run: sh scripts/make_ebooks.sh

- name: "create release"
- name: publish release
uses: softprops/action-gh-release@v2
with:
tag_name: "${{ inputs.version_number }}"
Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/make.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,13 @@ jobs:
runs-on: ubuntu-22.04

steps:
- name: print start date
run: date +%Y-%m-%d_%H:%M

- 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 output
- name: caching LaTeX files
uses: actions/cache@v4
with:
path: |
Expand Down Expand Up @@ -53,7 +50,7 @@ jobs:
# pwd
# ls -al

- name: check of chapters for known issues
- name: check chapters for known issues
run: python3 scripts/check_chapters.py

- name: check pre-commit tests
Expand Down Expand Up @@ -83,7 +80,7 @@ jobs:
ls -al
- name: upload files to release WorkInProgress
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
tag_name: WorkInProgress
prerelease: true
Expand All @@ -92,6 +89,3 @@ jobs:
./hpmor.epub
./hpmor.mobi
./hpmor.fb2
- name: print end date
run: date +%Y-%m-%d_%H:%M

0 comments on commit 9200b7a

Please sign in to comment.