From 1e03e605e3ca5bad43a64aff20d524a5ad516328 Mon Sep 17 00:00:00 2001 From: Sunny Date: Fri, 17 May 2024 16:36:41 +0800 Subject: [PATCH 1/2] =?UTF-8?q?ci(gitlab-ci):=20=E4=BF=AE=E5=A4=8DCI?= =?UTF-8?q?=E8=84=9A=E6=9C=AC=E5=A4=8D=E7=94=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab/ci.yml | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/.gitlab/ci.yml b/.gitlab/ci.yml index abd8f2d..d6c5a21 100644 --- a/.gitlab/ci.yml +++ b/.gitlab/ci.yml @@ -1,31 +1,37 @@ -image: rust -variables: - CARGO_HOME: $CI_PROJECT_DIR/cargo - -cache: - paths: - - $CARGO_HOME - stages: - check - release -before_script: - - export PATH="$PATH:$CARGO_HOME/bin" - - cargo install typst-cli git-cliff sd - # each merge request are required to ensure compiling the `.typ`s file successfully. check-merge-request: stage: check + image: rust + variables: + CARGO_HOME: $CI_PROJECT_DIR/cargo + cache: + paths: + - $CARGO_HOME rules: - if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH + before_script: + - export PATH="$PATH:$CARGO_HOME/bin" + - cargo install typst-cli git-cliff sd script: - typst compile --root=$CI_PROJECT_DIR --font-path=$CI_PROJECT_DIR/fonts $CI_PROJECT_DIR/template/thesis.typ check-default-branch: stage: check + image: rust + variables: + CARGO_HOME: $CI_PROJECT_DIR/cargo + cache: + paths: + - $CARGO_HOME rules: - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH + before_script: + - export PATH="$PATH:$CARGO_HOME/bin" + - cargo install typst-cli git-cliff sd script: - typst compile --root=$CI_PROJECT_DIR --font-path=$CI_PROJECT_DIR/fonts $CI_PROJECT_DIR/template/thesis.typ $CI_PROJECT_DIR/thesis_preview.pdf # TODO(#1): the preview pdf should be generated by template repo From 7677700650a300518657df07ac895d1905dc9426 Mon Sep 17 00:00:00 2001 From: Sunny Date: Fri, 17 May 2024 16:47:58 +0800 Subject: [PATCH 2/2] chore(release): v0.1.1-alpha.3 --- .gitlab/merge_request_templates/release.md | 1 + CHANGELOG.md | 6 ++++++ typst.toml | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitlab/merge_request_templates/release.md b/.gitlab/merge_request_templates/release.md index 0772f30..4df4a06 100644 --- a/.gitlab/merge_request_templates/release.md +++ b/.gitlab/merge_request_templates/release.md @@ -16,6 +16,7 @@ - [ ] 最后一个提交已更新 `CHANGELOG.md`: ```sh git cliff --unreleased --tag $BUMPED_VERSION --prepend CHANGELOG.md -- --newest + git add CHANGELOG.md ``` - [ ] 最后一个提交的提交信息符合 `chore(release): $BUMPED_VERSION` ```sh diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f7e09b..362551f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. +## [0.1.1-alpha.3] - 2024-05-17 + +### ⚙️ Miscellaneous Tasks + +- *(gitlab-ci)* 修复CI脚本复用问题 + ## [0.1.1-alpha.2] - 2024-05-17 ### 📚 Documentation diff --git a/typst.toml b/typst.toml index 0f92237..73dd326 100644 --- a/typst.toml +++ b/typst.toml @@ -1,6 +1,6 @@ [package] name = "morden-sysu-thesis" -version = "0.1.1-alpha.2" +version = "0.1.1-alpha.3" entrypoint = "lib.typ" repository = "https://gitlab.com/sysu-gitlab/thesis-template/better-thesis" authors = ["howardlau1999 <@howardlau1999>", "Sunny Huang <@huangjj27>"]