Skip to content

Commit 63ce6a8

Browse files
authored
Merge pull request #79 from loumir/loumir_workflow_update
Loumir workflow update. Miscellaneous changes OK
2 parents 13d30df + 9b56c5e commit 63ce6a8

File tree

6 files changed

+137
-118
lines changed

6 files changed

+137
-118
lines changed

.github/workflows/build.yml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# This file generated from a template file maintained in the ivoatex repository.
2+
# To create and install it into a project repository, do:
3+
# make github-preview
4+
# git commit
5+
# git push
6+
#
17
name: Check the IVOA document
28

39
env:
@@ -11,32 +17,32 @@ jobs:
1117
build:
1218

1319
runs-on: ubuntu-latest
14-
20+
1521
steps:
16-
22+
1723
- name: Checkout the repository
18-
uses: actions/checkout@v1
24+
uses: actions/checkout@v4
1925
with:
2026
submodules: true
21-
27+
2228
- name: Setup dependencies
2329
run: |
2430
sudo apt update
25-
sudo apt install texlive-latex-base texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended xsltproc latexmk cm-super
26-
31+
sudo apt install texlive-latex-base texlive-latex-recommended \
32+
texlive-latex-extra texlive-fonts-recommended \
33+
librsvg2-bin latexmk \
34+
pdftk xsltproc latexmk cm-super
35+
2736
- name: Build the document
2837
run: make
29-
38+
3039
- name: Check the output
3140
run: |
3241
test -f ${{ env.doc_name }}.pdf
3342
test -f ${{ env.doc_name }}.bbl
34-
35-
- name: Keep the PDF artefact
43+
44+
- name: Keep the PDF artefact
3645
uses: actions/upload-artifact@v4
3746
with:
3847
name: PDF Preview
3948
path: ${{ env.doc_name }}.pdf
40-
41-
42-

.github/workflows/preview.yml

Lines changed: 47 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,73 @@
1+
# This file generated from a template file maintained in the ivoatex repository.
2+
# To create and install it into a project repository, do:
3+
# make github-preview
4+
# git commit
5+
# git push
6+
#
17
name: Update PDF Preview
28

39
env:
4-
doc_name: ObsCoreExtensionForRadioData
10+
doc_name : ObsCoreExtensionForRadioData
11+
branch_name: ${{ github.head_ref || github.ref_name }}
12+
tag_preview: auto-pdf-preview
513

614
on:
715
push:
816
branches:
9-
- main
17+
- main
1018

1119
jobs:
1220
build:
13-
21+
1422
runs-on: ubuntu-latest
15-
23+
1624
steps:
17-
25+
1826
- name: Checkout the repository
19-
uses: actions/checkout@v1
27+
uses: actions/checkout@v4
2028
with:
2129
submodules: true
22-
30+
2331
- name: Setup dependencies
2432
run: |
25-
sudo apt update
26-
sudo apt install texlive-latex-base texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended xsltproc latexmk cm-super
27-
sudo snap install pdftk
28-
33+
sudo apt install texlive-latex-base texlive-latex-recommended \
34+
texlive-latex-extra texlive-fonts-recommended \
35+
librsvg2-bin latexmk \
36+
pdftk xsltproc latexmk cm-super
37+
2938
- name: Build the document
3039
run: make ${{ env.doc_name }}-draft.pdf
3140

32-
3341
- name: Check the output
3442
run: |
3543
test -f ${{ env.doc_name }}-draft.pdf
3644
test -f ${{ env.doc_name }}.bbl
37-
38-
- name: Move the auto-pdf-preview tag
39-
uses: weareyipyip/walking-tag-action@v2
40-
with:
41-
tag-name: auto-pdf-preview
42-
tag-message: |
43-
Last commit taken into account for the automatically updated PDF preview of this IVOA document.
45+
46+
- name: Remove the former PDF preview (if any)
47+
run: |
48+
existingTag=$( gh release list --exclude-drafts --json 'isPrerelease,tagName' \
49+
--jq '.[] | select(.isPrerelease == true and .tagName == "${{ env.tag_preview }}") | .tagName' \
50+
| xargs -n 1 echo )
51+
if [ -n "$existingTag" ];
52+
then
53+
gh release delete --cleanup-tag "$existingTag"
54+
fi
4455
env:
45-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46-
47-
- name: Update the PDF preview
48-
uses: Xotl/cool-github-releases@v1
49-
with:
50-
mode: update
51-
isPrerelease: true
52-
tag_name: auto-pdf-preview
53-
release_name: "Auto PDF Preview"
54-
body_mrkdwn: |
55-
This release aims to provide a PDF preview of the last commit applied on this repository.
56+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57+
58+
- name: Upload the new PDF preview
59+
run: |
60+
RELEASE_NOTES="This release aims to provide a PDF preview of the last commit applied on this repository.
5661
It will be updated automatically after each merge of a PullRequest.
57-
**DO NOT PUBLISH THIS PRE-RELEASE!**"
58-
_Corresponding commit: ${{ github.sha }}_
59-
assets: ${{ env.doc_name }}-draft.pdf
60-
replace_assets: true
61-
github_token: ${{ secrets.GITHUB_TOKEN }}
62-
62+
**DO NOT PUBLISH THIS PRE-RELEASE!**
63+
_Corresponding commit: ${{ github.sha }}_"
64+
65+
gh release create ${{ env.tag_preview }} \
66+
${{ env.doc_name }}-draft.pdf \
67+
--prerelease \
68+
--target "${{ env.branch_name }}" \
69+
--title 'Auto PDF Preview' \
70+
--notes "$RELEASE_NOTES"
71+
env:
72+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
73+

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ DOCNAME = ObsCoreExtensionForRadioData
77
DOCVERSION = 1.0
88

99
# Publication date, ISO format; update manually for "releases"
10-
DOCDATE = 2025-06-02
10+
DOCDATE = 2025-06-17
1111
# What is it you're writing: NOTE, WD, PR, or REC
1212
DOCTYPE = PEN
1313

0 commit comments

Comments
 (0)