forked from yakimka/python_interview_questions
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (32 loc) · 1018 Bytes
/
ci-workflow.yml
File metadata and controls
36 lines (32 loc) · 1018 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Checks workflow
on: ['push', 'pull_request']
jobs:
check-toc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run
run: make toc-check
release:
needs: check-toc
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- 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/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_${{ env.TAG }}.epub