Skip to content

Commit da05960

Browse files
authored
Merge pull request #116 from Bonnarel/master
this is now a recommandation
2 parents ec4e518 + deeadea commit da05960

File tree

5 files changed

+85
-61
lines changed

5 files changed

+85
-61
lines changed

.github/workflows/build.yml

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,48 @@
1-
name: CI build of the standard
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+
#
7+
name: Check the IVOA document
28

3-
on:
9+
env:
10+
doc_name: DataLink
11+
12+
on:
413
pull_request:
514
types: [opened, synchronize, reopened]
615

716
jobs:
817
build:
918

1019
runs-on: ubuntu-latest
11-
20+
1221
steps:
13-
- uses: actions/checkout@v1
22+
23+
- name: Checkout the repository
24+
uses: actions/checkout@v4
1425
with:
1526
submodules: true
27+
1628
- name: Setup dependencies
1729
run: |
18-
sudo add-apt-repository ppa:inkscape.dev/stable
1930
sudo apt update
20-
sudo apt install texlive-latex-base texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended xsltproc ghostscript cm-super librsvg2-bin inkscape
21-
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+
2236
- name: Build the document
23-
run: |
24-
inkscape --version
25-
make role_diagram.pdf biblio forcetex
26-
37+
run: make
38+
2739
- name: Check the output
2840
run: |
29-
test -f DataLink.pdf
30-
test -f DataLink.bbl
31-
32-
- uses: actions/upload-artifact@v1
41+
test -f ${{ env.doc_name }}.pdf
42+
test -f ${{ env.doc_name }}.bbl
43+
44+
- name: Keep the PDF artefact
45+
uses: actions/upload-artifact@v4
3346
with:
34-
name: DataLink.pdf Preview
35-
path: DataLink.pdf
47+
name: PDF Preview
48+
path: ${{ env.doc_name }}.pdf

.github/workflows/preview.yml

Lines changed: 48 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
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: DataLink
10+
doc_name : DataLink
11+
branch_name: ${{ github.head_ref || github.ref_name }}
12+
tag_preview: auto-pdf-preview
513

614
on:
715
push:
@@ -10,54 +18,57 @@ on:
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 add-apt-repository ppa:inkscape.dev/stable
2633
sudo apt update
27-
sudo apt install texlive-latex-base texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended xsltproc latexmk cm-super inkscape
28-
sudo snap install pdftk
29-
34+
sudo apt install texlive-latex-base texlive-latex-recommended \
35+
texlive-latex-extra texlive-fonts-recommended \
36+
librsvg2-bin latexmk \
37+
pdftk xsltproc latexmk cm-super
38+
3039
- name: Build the document
31-
run: |
32-
inkscape --version
33-
make role_diagram.pdf ${{ env.doc_name }}-draft.pdf
34-
40+
run: make ${{ env.doc_name }}-draft.pdf
41+
3542
- name: Check the output
3643
run: |
3744
test -f ${{ env.doc_name }}-draft.pdf
3845
test -f ${{ env.doc_name }}.bbl
39-
40-
- name: Move the auto-pdf-preview tag
41-
uses: weareyipyip/walking-tag-action@v2
42-
with:
43-
tag-name: auto-pdf-preview
44-
tag-message: |
45-
Last commit taken into account for the automatically updated PDF preview of this IVOA document.
46+
47+
- name: Remove the former PDF preview (if any)
48+
run: |
49+
existingTag=$( gh release list --exclude-drafts --json 'isPrerelease,tagName' \
50+
--jq '.[] | select(.isPrerelease == true and .tagName == "${{ env.tag_preview }}") | .tagName' \
51+
| xargs -n 1 echo )
52+
if [ -n "$existingTag" ];
53+
then
54+
gh release delete --cleanup-tag "$existingTag"
55+
fi
4656
env:
47-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48-
49-
- name: Update the PDF preview
50-
uses: Xotl/cool-github-releases@v1
51-
with:
52-
mode: update
53-
isPrerelease: true
54-
tag_name: auto-pdf-preview
55-
release_name: "Auto PDF Preview"
56-
body_mrkdwn: |
57-
This release aims to provide a PDF preview of the last commit applied on this repository.
57+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58+
59+
- name: Upload the new PDF preview
60+
run: |
61+
RELEASE_NOTES="This release aims to provide a PDF preview of the last commit applied on this repository.
5862
It will be updated automatically after each merge of a PullRequest.
59-
**DO NOT PUBLISH THIS PRE-RELEASE!**"
60-
_Corresponding commit: ${{ github.sha }}_
61-
assets: ${{ env.doc_name }}-draft.pdf
62-
replace_assets: true
63-
github_token: ${{ secrets.GITHUB_TOKEN }}
63+
**DO NOT PUBLISH THIS PRE-RELEASE!**
64+
_Corresponding commit: ${{ github.sha }}_"
65+
66+
gh release create ${{ env.tag_preview }} \
67+
${{ env.doc_name }}-draft.pdf \
68+
--prerelease \
69+
--target "${{ env.branch_name }}" \
70+
--title 'Auto PDF Preview' \
71+
--notes "$RELEASE_NOTES"
72+
env:
73+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
74+

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ DOCNAME = DataLink
77
DOCVERSION = 1.1
88

99
# Publication date, ISO format; update manually for "releases"
10-
DOCDATE = 2023-11-08
10+
DOCDATE = 2023-12-15
11+
12+
1113

1214
# What is it you're writing: NOTE, WD, PR, REC, PEN, or EN
13-
DOCTYPE = PR
15+
DOCTYPE = REC
1416

1517
# An e-mail address of the person doing the submission to the document
1618
# repository (can be empty until a make upload is being made)

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,12 @@ DataLink is an IVOA standard which defines mechanisms for connecting data items
77
## Status
88

99
The last stable version is
10-
**[REC-1.0](https://www.ivoa.net/documents/DataLink/20150617/index.html)**.
11-
12-
The next version will be 1.1. A **[Proposed Recommendation](https://www.ivoa.net/documents/DataLink/20230413/index.html)** is already available. It is not yet finalized and so, should not be considered yet as stable for operational implementation, however reference implementations are encouraged.
10+
**[REC-1.1](https://www.ivoa.net/documents/DataLink/20231215/)**.
1311

1412

1513
# History
1614

17-
DataLink 1.0 is an IVOA Recommendation, published at
15+
DataLink 1.1 is an IVOA Recommendation, published at
1816
http://www.ivoa.net/documents/DataLink/.
1917

2018
The initial commits into this repository were a transcription of

0 commit comments

Comments
 (0)