Skip to content

Commit 9200b7a

Browse files
committed
Caching for create-release.yml and minor changes to make.yml
1 parent da307ba commit 9200b7a

File tree

2 files changed

+24
-18
lines changed

2 files changed

+24
-18
lines changed

.github/workflows/create-release.yml

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
# This manually started workflow builds PDFs and eBooks and creates a new release with these assets.
2-
# Build part is copied from make.yml .
3-
42
name: "Create Release"
53

64
on:
7-
workflow_dispatch:
5+
workflow_dispatch: # manual triggering
86
inputs:
97
version_number:
108
description: "Version number"
@@ -27,28 +25,42 @@ jobs:
2725

2826
# steps are copied from make.yml
2927

30-
- name: Checkout repository
28+
- name: checkout repository
3129
uses: actions/checkout@v4
3230
with:
3331
persist-credentials: false
3432
fetch-depth: 1 # 0 if you want to push to repo
3533

36-
- name: Python set up
34+
- name: caching LaTeX files
35+
uses: actions/cache@v4
36+
with:
37+
path: |
38+
chapters/*.aux
39+
hpmor*.aux
40+
hpmor*.fdb_latexmk
41+
hpmor*.fls
42+
hpmor*.out
43+
hpmor*.pdf
44+
hpmor*.toc
45+
hpmor*.xdv
46+
key: tex-cache
47+
48+
- name: python set up
3749
uses: actions/setup-python@v5
3850
with:
3951
python-version: "3.10"
4052
# cache: "pip"
4153

42-
- name: Python cache set up
54+
- name: python cache set up
4355
uses: actions/cache@v4
4456
with:
4557
path: ${{ env.pythonLocation }}
4658
key: ${{ env.pythonLocation }}-py-cache
4759

48-
- name: Check of chapters for known issues
60+
- name: check chapters for known issues
4961
run: python3 scripts/check_chapters.py
5062

51-
- name: Check pre-commit tests
63+
- name: check pre-commit tests
5264
uses: pre-commit/action@v3.0.1
5365

5466
- name: install requirements
@@ -60,7 +72,7 @@ jobs:
6072
- name: make eBooks
6173
run: sh scripts/make_ebooks.sh
6274

63-
- name: "create release"
75+
- name: publish release
6476
uses: softprops/action-gh-release@v2
6577
with:
6678
tag_name: "${{ inputs.version_number }}"

.github/workflows/make.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,13 @@ jobs:
1313
runs-on: ubuntu-22.04
1414

1515
steps:
16-
- name: print start date
17-
run: date +%Y-%m-%d_%H:%M
18-
1916
- name: checkout repository
2017
uses: actions/checkout@v4
2118
with:
2219
persist-credentials: false
2320
fetch-depth: 1 # 0 if you want to push to repo
2421

25-
- name: caching LaTeX output
22+
- name: caching LaTeX files
2623
uses: actions/cache@v4
2724
with:
2825
path: |
@@ -53,7 +50,7 @@ jobs:
5350
# pwd
5451
# ls -al
5552

56-
- name: check of chapters for known issues
53+
- name: check chapters for known issues
5754
run: python3 scripts/check_chapters.py
5855

5956
- name: check pre-commit tests
@@ -83,7 +80,7 @@ jobs:
8380
ls -al
8481
8582
- name: upload files to release WorkInProgress
86-
uses: softprops/action-gh-release@v1
83+
uses: softprops/action-gh-release@v2
8784
with:
8885
tag_name: WorkInProgress
8986
prerelease: true
@@ -92,6 +89,3 @@ jobs:
9289
./hpmor.epub
9390
./hpmor.mobi
9491
./hpmor.fb2
95-
96-
- name: print end date
97-
run: date +%Y-%m-%d_%H:%M

0 commit comments

Comments
 (0)