Skip to content

ci: remove ensure_updated_cls. #46

ci: remove ensure_updated_cls.

ci: remove ensure_updated_cls. #46

Workflow file for this run

name: Release

Check failure on line 1 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / Release

Invalid workflow file

The workflow is not valid. .github/workflows/release.yml: Anchors are not currently supported. Remove the anchor 'CHECKOUT'
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_bithesis_templates:
name: Publish ${{ matrix.template }}
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
template: [graduate-thesis, undergraduate-thesis, paper-translation, undergraduate-thesis-en]
steps:
- &CHECKOUT
uses: actions/checkout@v2
- &DOWNLOAD_BITHESIS
name: Download bithesis.pdf
uses: actions/download-artifact@v3
with:
name: bithesis
- &DOANLOWD_CLS
name: Download bithesis.cls
uses: actions/download-artifact@v3
with:
name: cls
- &MOVE_CLS
name: Move `.cls` file to template
run: mv bithesis.cls ./templates/${{ matrix.template }}
- &MOVE_ARTIFACTS
name: Copy artifacts to the template folder.
run: mv bithesis.pdf ./templates/${{ matrix.template }}
- &ZIP_INSTALL
name: Install zip
uses: montudor/action-zip@v1
- &ZIP_TEMPLATE
name: Zip files under ./${{ matrix.template }}
run: zip -qq -r ./${{ matrix.template }}.zip ./${{ matrix.template }}
working-directory: ./templates
- &UPLOAD_ARTIFACTS
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_bitreport_templates:
name: Publish ${{ matrix.template }}
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
template: [lab-report]
steps:
- *CHECKOUT
- *DOWNLOAD_BITHESIS
- *DOANLOWD_CLS
- name: Move `.cls` file to template
run: mv bitreport.cls ./templates/${{ matrix.template }}
- *MOVE_ARTIFACTS
- *ZIP_INSTALL
- *ZIP_TEMPLATE
- *UPLOAD_ARTIFACTS
publish_bitbeamer_templates:
name: Publish ${{ matrix.template }}
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
template: [presentation-slide]
steps:
- *CHECKOUT
- *DOWNLOAD_BITHESIS
- *DOANLOWD_CLS
- name: Move `.cls` file to template
run: mv bitbeamer.cls ./templates/${{ matrix.template }}
- *MOVE_ARTIFACTS
- *ZIP_INSTALL
- *ZIP_TEMPLATE
- *UPLOAD_ARTIFACTS
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 }}