From c1ec814fcc5e87f26a1e7bbd3c4df7efbf7d3afb Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Wed, 17 Jul 2024 08:07:13 +0200 Subject: [PATCH] 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