mirror of
https://github.com/luongnv89/claude-howto.git
synced 2026-07-20 23:30:51 +02:00
fix(release): address review feedback — subtitle wiring, zh guard, empty-dist guard
- Wire language-specific subtitle through EPUBConfig.subtitle field so create_cover_image renders the correct cover text per --lang instead of always using the hardcoded English defaults - Add continue-on-error for zh matrix leg (zh/ content not yet populated) and explicit permissions: contents: read on the build job - Add 'Check artifacts exist' guard step before Create Release so an all-languages-fail scenario produces a clear failure rather than confusing softprops errors; make 'List built artifacts' tolerant of an empty dist/
This commit is contained in:
@@ -9,12 +9,20 @@ jobs:
|
||||
build:
|
||||
name: Build EPUB (${{ matrix.lang }})
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: ${{ matrix.continue-on-error == true }}
|
||||
permissions:
|
||||
contents: read
|
||||
strategy:
|
||||
# Don't cancel other languages if one fails — we still want to release
|
||||
# whichever languages built successfully.
|
||||
fail-fast: false
|
||||
matrix:
|
||||
lang: [en, vi, zh]
|
||||
include:
|
||||
# zh/ content is scaffolded but not yet populated; allow this leg
|
||||
# to fail without blocking the release of en/vi EPUBs.
|
||||
- lang: zh
|
||||
continue-on-error: true
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -70,7 +78,17 @@ jobs:
|
||||
merge-multiple: true
|
||||
|
||||
- name: List built artifacts
|
||||
run: ls -lh dist/
|
||||
run: ls -lh dist/ 2>/dev/null || echo "dist/ is empty or does not exist"
|
||||
|
||||
- name: Check artifacts exist
|
||||
id: check_artifacts
|
||||
run: |
|
||||
count=$(ls dist/*.epub 2>/dev/null | wc -l)
|
||||
echo "count=$count" >> $GITHUB_OUTPUT
|
||||
if [ "$count" -eq 0 ]; then
|
||||
echo "No EPUB artifacts were built — skipping release."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Create Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
|
||||
Reference in New Issue
Block a user