Skip to content

Commit

Permalink
add download to test
Browse files Browse the repository at this point in the history
  • Loading branch information
prudhomm committed Jul 17, 2024
1 parent fa18d2c commit c1ec814
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions .github/workflows/latex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit c1ec814

Please sign in to comment.