Skip to content

feat: add release

feat: add release #164

Workflow file for this run

name: make-epub
on:
push:
branches: [ "master" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
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.TOKEN }}
file: "*.epub"
tag: latest
file_glob: true
overwrite: true
make_latest: false
body: |
${{ steps.read_release.outputs.RELEASE_BODY }} `*-vst` 代表竪排,`*.epub` 代表橫排。