Skip to content

Commit e25b531

Browse files
committed
Use environment variable for filename
1 parent ad8f58b commit e25b531

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/release-pdf-on-tag.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,22 @@ on:
55
tags:
66
- '*'
77

8+
env:
9+
FILE: main
10+
811
jobs:
912
build:
1013
runs-on: ubuntu-latest
1114
steps:
1215
- name: Checkout repository
1316
uses: actions/checkout@v1
1417
- name: Compile
15-
run: docker run --mount src=$GITHUB_WORKSPACE/src,target=/usr/src/tex,type=bind dxjoke/tectonic-docker /bin/sh -c "tectonic main.tex"
18+
run: docker run --mount src=$GITHUB_WORKSPACE/src,target=/usr/src/tex,type=bind dxjoke/tectonic-docker /bin/sh -c "tectonic $FILE.tex"
1619
- name: Upload pdf
1720
uses: actions/upload-artifact@v2
1821
with:
1922
name: main.zip
20-
path: src/main.pdf
23+
path: src/*.pdf
2124
- name: Create Release
2225
id: create_release
2326
uses: actions/create-release@v1
@@ -35,6 +38,6 @@ jobs:
3538
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3639
with:
3740
upload_url: ${{ steps.create_release.outputs.upload_url }}
38-
asset_path: ./src/main.pdf
39-
asset_name: main.pdf
41+
asset_path: ./src/$FILE.pdf
42+
asset_name: $FILE.pdf
4043
asset_content_type: application/pdf

0 commit comments

Comments
 (0)