diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e238fab..fa5ea5b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,15 @@ -name: CI build of the standard +# This file generated from a template file maintained in the ivoatex repository. +# To create and install it into a project repository, do: +# make github-preview +# git commit +# git push +# +name: Check the IVOA document -on: +env: + doc_name: DataLink + +on: pull_request: types: [opened, synchronize, reopened] @@ -8,28 +17,32 @@ jobs: build: runs-on: ubuntu-latest - + steps: - - uses: actions/checkout@v1 + + - name: Checkout the repository + uses: actions/checkout@v4 with: submodules: true + - name: Setup dependencies run: | - sudo add-apt-repository ppa:inkscape.dev/stable sudo apt update - sudo apt install texlive-latex-base texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended xsltproc ghostscript cm-super librsvg2-bin inkscape - + sudo apt install texlive-latex-base texlive-latex-recommended \ + texlive-latex-extra texlive-fonts-recommended \ + librsvg2-bin latexmk \ + pdftk xsltproc latexmk cm-super + - name: Build the document - run: | - inkscape --version - make role_diagram.pdf biblio forcetex - + run: make + - name: Check the output run: | - test -f DataLink.pdf - test -f DataLink.bbl - - - uses: actions/upload-artifact@v1 + test -f ${{ env.doc_name }}.pdf + test -f ${{ env.doc_name }}.bbl + + - name: Keep the PDF artefact + uses: actions/upload-artifact@v4 with: - name: DataLink.pdf Preview - path: DataLink.pdf + name: PDF Preview + path: ${{ env.doc_name }}.pdf diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 4cb9d04..44b447a 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -1,7 +1,15 @@ +# This file generated from a template file maintained in the ivoatex repository. +# To create and install it into a project repository, do: +# make github-preview +# git commit +# git push +# name: Update PDF Preview env: - doc_name: DataLink + doc_name : DataLink + branch_name: ${{ github.head_ref || github.ref_name }} + tag_preview: auto-pdf-preview on: push: @@ -10,54 +18,57 @@ on: jobs: build: - + runs-on: ubuntu-latest - + steps: - + - name: Checkout the repository - uses: actions/checkout@v1 + uses: actions/checkout@v4 with: submodules: true - + - name: Setup dependencies run: | - sudo add-apt-repository ppa:inkscape.dev/stable sudo apt update - sudo apt install texlive-latex-base texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended xsltproc latexmk cm-super inkscape - sudo snap install pdftk - + sudo apt install texlive-latex-base texlive-latex-recommended \ + texlive-latex-extra texlive-fonts-recommended \ + librsvg2-bin latexmk \ + pdftk xsltproc latexmk cm-super + - name: Build the document - run: | - inkscape --version - make role_diagram.pdf ${{ env.doc_name }}-draft.pdf - + run: make ${{ env.doc_name }}-draft.pdf + - name: Check the output run: | test -f ${{ env.doc_name }}-draft.pdf test -f ${{ env.doc_name }}.bbl - - - name: Move the auto-pdf-preview tag - uses: weareyipyip/walking-tag-action@v2 - with: - tag-name: auto-pdf-preview - tag-message: | - Last commit taken into account for the automatically updated PDF preview of this IVOA document. + + - name: Remove the former PDF preview (if any) + run: | + existingTag=$( gh release list --exclude-drafts --json 'isPrerelease,tagName' \ + --jq '.[] | select(.isPrerelease == true and .tagName == "${{ env.tag_preview }}") | .tagName' \ + | xargs -n 1 echo ) + if [ -n "$existingTag" ]; + then + gh release delete --cleanup-tag "$existingTag" + fi env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Update the PDF preview - uses: Xotl/cool-github-releases@v1 - with: - mode: update - isPrerelease: true - tag_name: auto-pdf-preview - release_name: "Auto PDF Preview" - body_mrkdwn: | - This release aims to provide a PDF preview of the last commit applied on this repository. + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload the new PDF preview + run: | + RELEASE_NOTES="This release aims to provide a PDF preview of the last commit applied on this repository. It will be updated automatically after each merge of a PullRequest. - **DO NOT PUBLISH THIS PRE-RELEASE!**" - _Corresponding commit: ${{ github.sha }}_ - assets: ${{ env.doc_name }}-draft.pdf - replace_assets: true - github_token: ${{ secrets.GITHUB_TOKEN }} + **DO NOT PUBLISH THIS PRE-RELEASE!** + _Corresponding commit: ${{ github.sha }}_" + + gh release create ${{ env.tag_preview }} \ + ${{ env.doc_name }}-draft.pdf \ + --prerelease \ + --target "${{ env.branch_name }}" \ + --title 'Auto PDF Preview' \ + --notes "$RELEASE_NOTES" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + diff --git a/Makefile b/Makefile index b275c3c..43591c2 100644 --- a/Makefile +++ b/Makefile @@ -7,10 +7,12 @@ DOCNAME = DataLink DOCVERSION = 1.1 # Publication date, ISO format; update manually for "releases" -DOCDATE = 2023-11-08 +DOCDATE = 2023-12-15 + + # What is it you're writing: NOTE, WD, PR, REC, PEN, or EN -DOCTYPE = PR +DOCTYPE = REC # An e-mail address of the person doing the submission to the document # repository (can be empty until a make upload is being made) diff --git a/ivoatex b/ivoatex index ffdbc09..e265eb0 160000 --- a/ivoatex +++ b/ivoatex @@ -1 +1 @@ -Subproject commit ffdbc0983d69ff1ecddf14e82dd71e4cf5ae4fa4 +Subproject commit e265eb0e9a0c956c33ccc4e0f20ceba905b1a63b