chore: fix broken cliff. #54
Workflow file for this run
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: Release | ||
on: | ||
push: | ||
tags: | ||
- "*.*.*" | ||
jobs: | ||
build: | ||
name: build bithesis manual | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: xu-cheng/texlive-action/full@v1 | ||
with: | ||
run: | | ||
apk add make msttcorefonts-installer fontconfig | ||
update-ms-fonts | ||
fc-cache -f | ||
make doc | ||
- name: Upload bithesis.pdf for later usage. | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: bithesis | ||
path: bithesis.pdf | ||
- name: Upload *.cls for later usage. | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: cls | ||
path: "*.cls" | ||
publish_templates: | ||
name: Publish ${{ matrix.template }} | ||
runs-on: ubuntu-latest | ||
needs: build | ||
strategy: | ||
matrix: | ||
template: [graduate-thesis, undergraduate-thesis, lab-report, paper-translation, presentation-slide, undergraduate-thesis-en, reading-report] | ||
include: | ||
- template: graduate-thesis | ||
cls: bithesis | ||
- template: undergraduate-thesis | ||
cls: bithesis | ||
- template: lab-report | ||
cls: bitreport | ||
- template: paper-translation | ||
cls: bithesis | ||
- template: presentation-slide | ||
cls: bitbeamer | ||
- template: undergraduate-thesis-en | ||
cls: bithesis | ||
- template: reading-report | ||
cls: bithesis | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Download bithesis.pdf | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: bithesis | ||
- name: Download `*.cls` | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: cls | ||
- name: Copy manual to the template folder. | ||
run: | | ||
mv bithesis.pdf ./templates/${{ matrix.template }} | ||
mv ${{ matrix.cls }}.cls ./templates/${{ matrix.template }} | ||
- name: Install zip | ||
uses: montudor/action-zip@v1 | ||
- name: Zip files under ./${{ matrix.template }} | ||
run: zip -qq -r ./${{ matrix.template }}.zip ./${{ matrix.template }} | ||
working-directory: ./templates | ||
- name: Upload ${{ matrix.template }}.zip to release | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: ./templates/${{ matrix.template }}.zip | ||
asset_name: ${{ matrix.template }}.zip | ||
tag: ${{ github.ref }} | ||
publish_cls: | ||
name: Publish ${{ matrix.cls }} | ||
runs-on: ubuntu-latest | ||
needs: build | ||
strategy: | ||
matrix: | ||
cls: [bithesis, bitreport, bitbeamer] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Download *.cls | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: cls | ||
- name: Upload ${{ matrix.cls }}.cls to release | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: ${{ matrix.cls }}.cls | ||
asset_name: ${{ matrix.cls }}.cls | ||
tag: ${{ github.ref }} | ||
changelog: | ||
name: Generate changelog | ||
runs-on: ubuntu-latest | ||
outputs: | ||
release_body: ${{ steps.git-cliff.outputs.content }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Generate a changelog | ||
uses: orhun/git-cliff-action@v3 | ||
id: git-cliff | ||
with: | ||
config: cliff.toml | ||
args: -vv --latest --strip header | ||
env: | ||
OUTPUT: CHANGES.md | ||
- name: Upload the releases notes | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: ${{ github.ref }} | ||
body: ${{ steps.git-cliff.outputs.content }} | ||
changelog: | ||
name: Generate changelog | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Generate a changelog | ||
uses: orhun/git-cliff-action@v3 | ||
with: | ||
config: cliff.toml | ||
args: --verbose | ||
env: | ||
OUTPUT: CHANGELOG.md | ||
- name: Commit | ||
run: | | ||
git config user.name 'github-actions[bot]' | ||
git config user.email 'github-actions[bot]@users.noreply.github.com' | ||
set +e | ||
git add CHANGELOG.md | ||
git commit -m "Update CHANGELOG" | ||
git push https://${{ secrets.GITHUB_TOKEN }}@github.com/BITNP/BIThesis.git main |