Update workflow (#5)

This commit is contained in:
yakimka
2022-01-18 21:02:21 +02:00
committed by GitHub
parent abf4c58c3a
commit 0e45ad81f2
3 changed files with 10 additions and 10 deletions

View File

@@ -16,21 +16,21 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Create epub
uses: docker://pandoc/core:2.14
with:
args: --toc --toc-depth=6 -o questions.epub metadata.txt questions.md
- name: Get TAG
if: startsWith(github.ref, 'refs/tags/')
run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Write build number
if: startsWith(github.ref, 'refs/tags/')
run: sed -i "s/build 1/$TAG/g" metadata.txt
- name: Test
run: cat metadata.txt
run: sed -i "s/dev-build/$TAG/g" metadata.txt
- name: Create epub
uses: docker://pandoc/core:2.14
with:
args: --toc --toc-depth=6 -o questions_${{ env.TAG }}.epub metadata.txt questions.md
- name: Print metadata.txt
run: ls -lh && cat metadata.txt
- name: Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: questions.epub
files: questions_${{ env.TAG }}.epub