update crowbook to v0.17.0 #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Release | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: ["main"] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Clone wiki repo | ||
run: git clone https://github.com/AbhiTheModder/understand-smali.wiki.git | ||
- name: Install Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
- name: Install xelatex | ||
run: sudo apt-get install -y texlive-xetex | ||
- name: Install Crowbook | ||
run: cargo install --git https://github.com/crowdagger/crowbook.git | ||
- name: Build PDF and EPUB | ||
run: | | ||
cd understand-smali.wiki | ||
crowbook understand-smali.book | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: understand-smali | ||
path: | | ||
understand-smali.wiki/understand-smali.pdf | ||
understand-smali.wiki/understand-smali.epub | ||
release: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: understand-smali | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.run_number - 7 }} | ||
Check failure on line 60 in .github/workflows/book-release.yml GitHub Actions / Build and ReleaseInvalid workflow file
|
||
release_name: Release ${{ github.run_number - 7 }} | ||
draft: false | ||
prerelease: false | ||
- name: Upload PDF to release | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./understand-smali.pdf | ||
asset_name: understand-smali.pdf | ||
asset_content_type: application/pdf | ||
- name: Upload EPUB to release | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./understand-smali.epub | ||
asset_name: understand-smali.epub | ||
asset_content_type: application/epub+zip |