Skip to content

Commit 81e7251

Browse files
committed
fix: issue with versionning
1 parent 7b3e9ac commit 81e7251

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/build-pdf.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,26 @@ jobs:
88
FINAL_FILENAME: Dewit_03281500_Yakoub_13861700_2020.pdf
99
LATEX_FILENAME: main.pdf
1010
MAIN_LATEX: main.tex
11+
outputs:
12+
fixCommands: ${{ steps.fixStep.outputs.TEXLIVE_WORKAROUND }}
1113
steps:
1214
- name: Set up Git repository
1315
uses: actions/checkout@v2
1416
# For weird reasons, xindy binaries are not available in Tex Live (xindy.x86_64-linuxmusl)
1517
# https://github.com/xu-cheng/latex-action/issues/32#issuecomment-626086551
1618
- name: Workaround script for xindy
19+
id: fixStep
1720
run: |
1821
content="$(tail -n +3 .github/workflows/texlive_workaround.sh)"
1922
content="${content//'%'/'%25'}"
2023
content="${content//$'\n'/'%0A'}"
2124
content="${content//$'\r'/'%0D'}"
22-
echo "::set-env name=TEXLIVE_WORKAROUND::$content"
25+
echo "::set-output name=TEXLIVE_WORKAROUND::$content"
2326
- name: Compile LaTeX document
2427
uses: xu-cheng/latex-action@v2
2528
with:
2629
pre_compile: |
27-
${{ env.TEXLIVE_WORKAROUND }}
30+
${{ steps.fixStep.outputs.TEXLIVE_WORKAROUND }}
2831
root_file: ${{ env.MAIN_LATEX }}
2932
- name: rename ${{ env.LATEX_FILENAME }} to ${{ env.FINAL_FILENAME }}
3033
run: |
@@ -37,12 +40,14 @@ jobs:
3740
- name: Get current date
3841
if: github.ref == 'refs/heads/master'
3942
run: echo "::set-env name=CURRENT_DATETIME::$(date +'%d/%m/%Y %H:%M%S')"
43+
- name: Get new version number
44+
run: echo "::set-env name=CURRENT_VERSION::${GITHUB_SHA::12}"
4045
- name: Upload result file into releases
4146
if: github.ref == 'refs/heads/master'
4247
uses: Xotl/cool-github-releases@v1.1.2
4348
with:
4449
mode: update
45-
tag_name: ${{ github.sha }}
50+
tag_name: ${{ env.CURRENT_VERSION }}
4651
release_name: PDF - ${{ env.CURRENT_DATETIME }}
4752
replace_assets: true
4853
assets: ${{ env.FINAL_FILENAME }}

0 commit comments

Comments
 (0)