From f68c6748c66bac589e36c2efb826b7553ab8d653 Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Wed, 17 Jul 2024 07:46:50 +0200 Subject: [PATCH 01/10] fix workflow #1 --- .github/workflows/latex.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/latex.yml b/.github/workflows/latex.yml index 32515dbe..59539c9c 100644 --- a/.github/workflows/latex.yml +++ b/.github/workflows/latex.yml @@ -31,6 +31,7 @@ jobs: release: runs-on: ubuntu-latest needs: build_latex + if: startsWith(github.ref ,'refs/tags/v') env: veersionedpdf: ${{ github.repository }}-v${{ github.ref_name }}.pdf steps: @@ -41,8 +42,7 @@ jobs: - name: Rename to add version run: mv ${{ github.repository }}.pdf ${{ env.veersionedpdf}} - name: Create Release - if: startsWith(github.ref ,'refs/tags/v') - needs: build_latex + id: create_release uses: softprops/action-gh-release@v2 with: From b51bf1e367dea7654caaa8724237b89dcf2ce7b3 Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Wed, 17 Jul 2024 07:56:21 +0200 Subject: [PATCH 02/10] try fix upload --- .github/workflows/latex.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/latex.yml b/.github/workflows/latex.yml index 59539c9c..3991e8af 100644 --- a/.github/workflows/latex.yml +++ b/.github/workflows/latex.yml @@ -20,13 +20,11 @@ jobs: uses: xu-cheng/latex-action@v3 with: root_file: main.tex - post_compile: | - mv main.pdf ${{ github.repository }}.pdf - name: Upload PDF uses: actions/upload-artifact@v4 with: - name: ${{ github.repository }}.pdf - path: . + name: ${{ github.repository_id }}-PDF + path: main.pdf release: runs-on: ubuntu-latest From fa18d2cd6a5aaaa5480cbe4942c1d6f69c4006d3 Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Wed, 17 Jul 2024 07:59:38 +0200 Subject: [PATCH 03/10] add repo_name #1 --- .github/workflows/latex.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/latex.yml b/.github/workflows/latex.yml index 3991e8af..76d76a7f 100644 --- a/.github/workflows/latex.yml +++ b/.github/workflows/latex.yml @@ -20,10 +20,14 @@ jobs: uses: xu-cheng/latex-action@v3 with: root_file: main.tex + - name: Get Repository Name + id: repo_name + run: echo "repo=${{ github.repository }}" | cut -d'/' -f2 >> GITHUB_OUTPUT - name: Upload PDF uses: actions/upload-artifact@v4 with: - name: ${{ github.repository_id }}-PDF + # get the name of the repo without the organisation + name: pdf-${{ steps.repo_name.outputs.repo }} path: main.pdf release: From c1ec814fcc5e87f26a1e7bbd3c4df7efbf7d3afb Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Wed, 17 Jul 2024 08:07:13 +0200 Subject: [PATCH 04/10] add download to test #1 --- .github/workflows/latex.yml | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/workflows/latex.yml b/.github/workflows/latex.yml index 76d76a7f..163998f0 100644 --- a/.github/workflows/latex.yml +++ b/.github/workflows/latex.yml @@ -13,6 +13,8 @@ on: jobs: build_latex: runs-on: self-ubuntu-24.04 + outputs: + prefix: ${{ steps.repo_name.outputs.prefix }} steps: - name: Set up Git repository uses: actions/checkout@v4 @@ -22,25 +24,38 @@ jobs: root_file: main.tex - name: Get Repository Name id: repo_name - run: echo "repo=${{ github.repository }}" | cut -d'/' -f2 >> GITHUB_OUTPUT + run: | + prefix=$(echo "${{ github.repository }}" | cut -d'/' -f2) + echo "prefix=$prefix >> GITHUB_OUTPUT - name: Upload PDF uses: actions/upload-artifact@v4 with: # get the name of the repo without the organisation - name: pdf-${{ steps.repo_name.outputs.repo }} + name: pdf-${{ steps.repo_name.outputs.prefix }} path: main.pdf + download: + runs-on: self-ubuntu-24.04 + needs: build_latex + env: + veersionedpdf: ${{ needs.build_latex.outputs.prefix }}.pdf + steps: + - name: Download PDF + uses: actions/download-artifact@v4 + with: + name: ${{ needs.build_latex.outputs.prefix }}.pdf + release: runs-on: ubuntu-latest needs: build_latex if: startsWith(github.ref ,'refs/tags/v') env: - veersionedpdf: ${{ github.repository }}-v${{ github.ref_name }}.pdf + veersionedpdf: ${{ needs.build_latex.outputs.prefix }}-v${{ github.ref_name }}.pdf steps: - name: Download PDF uses: actions/download-artifact@v4 with: - name: ${{ github.repository }}.pdf + name: ${{ needs.build_latex.outputs.prefix }}.pdf - name: Rename to add version run: mv ${{ github.repository }}.pdf ${{ env.veersionedpdf}} - name: Create Release From b3861eb8558b180044d7986b11e096d0c12e4ad2 Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Wed, 17 Jul 2024 08:09:01 +0200 Subject: [PATCH 05/10] add missing " #1 --- .github/workflows/latex.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/latex.yml b/.github/workflows/latex.yml index 163998f0..ed4398c1 100644 --- a/.github/workflows/latex.yml +++ b/.github/workflows/latex.yml @@ -26,7 +26,7 @@ jobs: id: repo_name run: | prefix=$(echo "${{ github.repository }}" | cut -d'/' -f2) - echo "prefix=$prefix >> GITHUB_OUTPUT + echo "prefix=$prefix" >> GITHUB_OUTPUT - name: Upload PDF uses: actions/upload-artifact@v4 with: From 4a371157db9b5be2fc0a3b29365c5b45321bb1f3 Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Wed, 17 Jul 2024 08:12:39 +0200 Subject: [PATCH 06/10] minor syntax fixes #1 --- .github/workflows/latex.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/latex.yml b/.github/workflows/latex.yml index ed4398c1..ba8cd024 100644 --- a/.github/workflows/latex.yml +++ b/.github/workflows/latex.yml @@ -26,7 +26,7 @@ jobs: id: repo_name run: | prefix=$(echo "${{ github.repository }}" | cut -d'/' -f2) - echo "prefix=$prefix" >> GITHUB_OUTPUT + echo "prefix=$prefix" >> "$GITHUB_OUTPUT" - name: Upload PDF uses: actions/upload-artifact@v4 with: @@ -38,26 +38,26 @@ jobs: runs-on: self-ubuntu-24.04 needs: build_latex env: - veersionedpdf: ${{ needs.build_latex.outputs.prefix }}.pdf + versionedpdf: ${{ needs.build_latex.outputs.prefix }}.pdf steps: - name: Download PDF uses: actions/download-artifact@v4 with: - name: ${{ needs.build_latex.outputs.prefix }}.pdf + name: ${{ env.versionedpdf }} release: runs-on: ubuntu-latest needs: build_latex if: startsWith(github.ref ,'refs/tags/v') env: - veersionedpdf: ${{ needs.build_latex.outputs.prefix }}-v${{ github.ref_name }}.pdf + versionedpdf: ${{ needs.build_latex.outputs.prefix }}-v${{ github.ref_name }}.pdf steps: - name: Download PDF uses: actions/download-artifact@v4 with: name: ${{ needs.build_latex.outputs.prefix }}.pdf - name: Rename to add version - run: mv ${{ github.repository }}.pdf ${{ env.veersionedpdf}} + run: mv ${{ github.repository }}.pdf ${{ env.versionedpdf}} - name: Create Release id: create_release @@ -70,4 +70,4 @@ jobs: tag_name: ${{ github.ref }} token: ${{ secrets.GITHUB_TOKEN }} files: | - ${{ env.veersionedpdf }} + ${{ env.versionedpdf }} From 4de9462344b702bda1d55e730756deca858e40fa Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Wed, 17 Jul 2024 08:15:53 +0200 Subject: [PATCH 07/10] debug rename #1 --- .github/workflows/latex.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/latex.yml b/.github/workflows/latex.yml index ba8cd024..02731933 100644 --- a/.github/workflows/latex.yml +++ b/.github/workflows/latex.yml @@ -43,7 +43,12 @@ jobs: - name: Download PDF uses: actions/download-artifact@v4 with: - name: ${{ env.versionedpdf }} + name: pdf-${{ needs.build_latex.outputs.prefix }} + - name: Rename to add version + run: | + ls -lrt + mv main.pdf ${{ env.versionedpdf}} + ls -lrt release: runs-on: ubuntu-latest From 2de5b49f3169174377f8d30243ad23d81278f255 Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Wed, 17 Jul 2024 08:21:34 +0200 Subject: [PATCH 08/10] minor changes #1 --- .github/workflows/latex.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/latex.yml b/.github/workflows/latex.yml index 02731933..c31ebcec 100644 --- a/.github/workflows/latex.yml +++ b/.github/workflows/latex.yml @@ -31,7 +31,7 @@ jobs: uses: actions/upload-artifact@v4 with: # get the name of the repo without the organisation - name: pdf-${{ steps.repo_name.outputs.prefix }} + name: PDF path: main.pdf download: @@ -43,7 +43,8 @@ jobs: - name: Download PDF uses: actions/download-artifact@v4 with: - name: pdf-${{ needs.build_latex.outputs.prefix }} + name: PDF + path: . - name: Rename to add version run: | ls -lrt From 40a853e84845f7178f77c299cd67133a47f876e1 Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Wed, 17 Jul 2024 08:28:18 +0200 Subject: [PATCH 09/10] download fails currently try another version #1 --- .github/workflows/latex.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/latex.yml b/.github/workflows/latex.yml index c31ebcec..6ea34995 100644 --- a/.github/workflows/latex.yml +++ b/.github/workflows/latex.yml @@ -28,7 +28,7 @@ jobs: prefix=$(echo "${{ github.repository }}" | cut -d'/' -f2) echo "prefix=$prefix" >> "$GITHUB_OUTPUT" - name: Upload PDF - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v4.1.0 with: # get the name of the repo without the organisation name: PDF @@ -41,7 +41,7 @@ jobs: versionedpdf: ${{ needs.build_latex.outputs.prefix }}.pdf steps: - name: Download PDF - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v4.1.2 with: name: PDF path: . From 9e7ff78e70e90793bcf7f0caef31b81255620dab Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Wed, 17 Jul 2024 08:35:17 +0200 Subject: [PATCH 10/10] no download #1 --- .github/workflows/latex.yml | 45 +++++++++---------------------------- 1 file changed, 11 insertions(+), 34 deletions(-) diff --git a/.github/workflows/latex.yml b/.github/workflows/latex.yml index 6ea34995..3a0d9c89 100644 --- a/.github/workflows/latex.yml +++ b/.github/workflows/latex.yml @@ -25,48 +25,25 @@ jobs: - name: Get Repository Name id: repo_name run: | + ls -lrt prefix=$(echo "${{ github.repository }}" | cut -d'/' -f2) echo "prefix=$prefix" >> "$GITHUB_OUTPUT" + echo "pdf=$prefix-v${{ github.ref_name }}.pdf" >> "$GITHUB_OUTPUT" + - + name: Rename PDF + run: | + mv main.pdf ${{ steps.repo_name.outputs.pdf }} - name: Upload PDF uses: actions/upload-artifact@v4.1.0 with: # get the name of the repo without the organisation name: PDF - path: main.pdf - - download: - runs-on: self-ubuntu-24.04 - needs: build_latex - env: - versionedpdf: ${{ needs.build_latex.outputs.prefix }}.pdf - steps: - - name: Download PDF - uses: actions/download-artifact@v4.1.2 - with: - name: PDF - path: . - - name: Rename to add version - run: | - ls -lrt - mv main.pdf ${{ env.versionedpdf}} - ls -lrt + path: ${{ steps.repo_name.outputs.pdf }} - release: - runs-on: ubuntu-latest - needs: build_latex - if: startsWith(github.ref ,'refs/tags/v') - env: - versionedpdf: ${{ needs.build_latex.outputs.prefix }}-v${{ github.ref_name }}.pdf - steps: - - name: Download PDF - uses: actions/download-artifact@v4 - with: - name: ${{ needs.build_latex.outputs.prefix }}.pdf - - name: Rename to add version - run: mv ${{ github.repository }}.pdf ${{ env.versionedpdf}} - - name: Create Release - + - + name: Create Release id: create_release + if: startsWith(github.ref, 'refs/tags/v') uses: softprops/action-gh-release@v2 with: draft: false @@ -76,4 +53,4 @@ jobs: tag_name: ${{ github.ref }} token: ${{ secrets.GITHUB_TOKEN }} files: | - ${{ env.versionedpdf }} + ${{ steps.repo_name.outputs.pdf }}