-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (42 loc) · 1.31 KB
/
make-epub.yml
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
37
38
39
40
41
42
43
44
45
46
47
name: make-epub
on:
workflow_dispatch:
push:
branches: [ "master" ]
permissions:
actions: write
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install zip
run: sudo apt-get install -y zip
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: |
zip -r sikutiyao-vst.epub META-INF mimetype OEBPS
sed -i 's/vertical-rl/horizontal-tb/g' OEBPS/Styles/*.css
sed -i 's/page-progression-direction="rtl"/page-progression-direction="ltr"/g' OEBPS/content.opf
zip -r sikutiyao.epub META-INF mimetype OEBPS
- name: Read release.md and use it as a body of new release
id: read_release
shell: bash
run: |
r=$(cat README.md)
r="${r//'%'/'%25'}"
r="${r//$'\n'/'%0A'}"
r="${r//$'\r'/'%0D'}"
echo "RELEASE_BODY=$r" >> $GITHUB_OUTPUT
- name: Publishing to GitHub Releases
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: "*.epub"
tag: latest
file_glob: true
overwrite: true
make_latest: false
body: |
${{ steps.read_release.outputs.RELEASE_BODY }} `*-vst` 代表竪排,`*.epub` 代表橫排。