Skip to content

Commit ee517ad

Browse files
committed
ci: sanitize tag for mobile-html filename (handles non-tag dispatch)
1 parent f17709e commit ee517ad

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

.github/workflows/auto-release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,10 @@ jobs:
7272
sudo dpkg -i /tmp/pandoc.deb && pandoc --version | head -1
7373
PUPPETEER_SKIP_DOWNLOAD=true npm install -g @mermaid-js/mermaid-cli@10
7474
TITLE=$(python3 -c "import json;print(json.load(open('book.json')).get('title') or '${{ github.event.repository.name }}')")
75+
TAG=$(echo "${{ steps.tag.outputs.TAG_NAME || 'latest' }}" | sed 's#.*/##') # slash-free (handles non-tag dispatch)
7576
python3 tools/render_mermaid.py --book-dir . --svg-out /tmp/mmsvg
7677
python3 tools/build_mobile_book.py --book-dir . --title "$TITLE" --svg-dir /tmp/mmsvg \
77-
--out "${{ github.event.repository.name }}-${{ steps.tag.outputs.TAG_NAME || 'latest' }}-mobile.html"
78+
--out "${{ github.event.repository.name }}-${TAG}-mobile.html"
7879
ls -lh ${{ github.event.repository.name }}-*-mobile.html
7980
8081
- name: Attach mobile HTML to release

0 commit comments

Comments
 (0)