From e6080715ab6ca7a0fc4ebc87f88771d275a81cb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Sus=CC=8Cicky=CC=81?= Date: Wed, 18 Oct 2023 19:13:27 +0200 Subject: [PATCH] ci(workflow): add release workflow --- .github/workflows/ci.yml | 17 ----------------- .github/workflows/release.yml | 29 +++++++++++++++++++++++++++++ README.md | 2 +- 3 files changed, 30 insertions(+), 18 deletions(-) delete mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index e433e7a..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: ci - -on: [push] - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - uses: xu-cheng/latex-action@v3 - with: - root_file: ./src/thesis.tex - texlive_version: latest - env: - TEXINPUTS: ".:./src:./src/common" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..1ed3145 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,29 @@ +name: release + +on: + push: + tags: + - "*" + +jobs: + build: + runs-on: ubuntu-latest + permissions: write-all + + steps: + - uses: actions/checkout@v4 + + - uses: xu-cheng/latex-action@v3 + with: + root_file: thesis.tex + texlive_version: latest + working_directory: src + + - run: echo "TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV + + - uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: src/thesis.pdf + asset_name: thesis-${{ env.TAG }}.pdf + tag: ${{ github.ref }} diff --git a/README.md b/README.md index 4f5dc62..18425f3 100644 --- a/README.md +++ b/README.md @@ -48,9 +48,9 @@ To make your life a little bit easier, there are several `TODO` comments placed │ │ ├─ ctuth-names.tex │ │ ├─ ctuth-templates.tex │ │ ├─ ctuth-pkg.tex -│ │ ├─ ctuthesis.cls # LaTeX class file that makes all the magic, don't worry about it too much. │ ├─ documents/ # Directory for all sorts of documents │ │ ├─ zadani.pdf # Specification of your thesis +│ ├─ ctuthesis.cls # LaTeX class file that makes all the magic, don't worry about it too much. │ ├─ thesis.ist # Formatting configuration for Index of the document │ ├─ thesis.bib # Bibliography references │ ├─ thesis.tex # Entry tex file for your thesis