forked from sjtug/SJTUThesis
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: refine build process (sjtug#673)
- Loading branch information
Showing
7 changed files
with
86 additions
and
145 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
rm -rf build | ||
mkdir -p build | ||
|
||
sed -e "s|documentclass\[.*\]|documentclass\[type=bachelor\]|g" main.tex > build/build-bachelor.tex | ||
sed -e "s|documentclass\[.*\]|documentclass\[type=master\]|g" main.tex > build/build-master.tex | ||
|
||
echo "--- Bachelor Template ---" | ||
head build/build-bachelor.tex | ||
|
||
echo "--- Master Template ---" | ||
head build/build-master.tex | ||
|
||
latexmk $@ -outdir=build build/build-*.tex |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
on: | ||
push: | ||
branches: | ||
- release | ||
tags: | ||
- "v*" | ||
|
||
name: Release | ||
|
||
jobs: | ||
release-xelatex: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
name: checkout code | ||
- uses: xu-cheng/texlive-action/full@v1 | ||
with: | ||
run: | | ||
.github/ci/build_variants.sh -halt-on-error -time -quiet -xelatex | ||
name: build with XeLaTeX | ||
- run: cat build/build-*.log | ||
name: display build log | ||
if: ${{ failure() || success() }} | ||
- uses: actions/create-release@latest | ||
id: create_release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
body: ${{ github.event.head_commit.message }} | ||
draft: true | ||
prerelease: true | ||
- name: add build-bachelor | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: build/build-bachelor.pdf | ||
asset_name: build-bachelor.pdf | ||
asset_content_type: application/pdf | ||
- name: add build-master | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: build/build-master.pdf | ||
asset_name: build-master.pdf | ||
asset_content_type: application/pdf |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -252,3 +252,5 @@ ehthumbs_vista.db | |
# Project specific | ||
main.pdf | ||
thesis-bot.yml | ||
|
||
build/ |