Skip to content

Commit 8036ec0

Browse files
committed
chore(merging): 'ci-refactor-build-flow' into 'main'
ci(gitlab-ci): 修复CI脚本复用问题 See merge request sysu-gitlab/thesis-template/better-thesis!8
2 parents 69ebc8c + 7677700 commit 8036ec0

File tree

4 files changed

+26
-13
lines changed

4 files changed

+26
-13
lines changed

.gitlab/ci.yml

+18-12
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,37 @@
1-
image: rust
2-
variables:
3-
CARGO_HOME: $CI_PROJECT_DIR/cargo
4-
5-
cache:
6-
paths:
7-
- $CARGO_HOME
8-
91
stages:
102
- check
113
- release
124

13-
before_script:
14-
- export PATH="$PATH:$CARGO_HOME/bin"
15-
- cargo install typst-cli git-cliff sd
16-
175
# each merge request are required to ensure compiling the `.typ`s file successfully.
186
check-merge-request:
197
stage: check
8+
image: rust
9+
variables:
10+
CARGO_HOME: $CI_PROJECT_DIR/cargo
11+
cache:
12+
paths:
13+
- $CARGO_HOME
2014
rules:
2115
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
16+
before_script:
17+
- export PATH="$PATH:$CARGO_HOME/bin"
18+
- cargo install typst-cli git-cliff sd
2219
script:
2320
- typst compile --root=$CI_PROJECT_DIR --font-path=$CI_PROJECT_DIR/fonts $CI_PROJECT_DIR/template/thesis.typ
2421

2522
check-default-branch:
2623
stage: check
24+
image: rust
25+
variables:
26+
CARGO_HOME: $CI_PROJECT_DIR/cargo
27+
cache:
28+
paths:
29+
- $CARGO_HOME
2730
rules:
2831
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
32+
before_script:
33+
- export PATH="$PATH:$CARGO_HOME/bin"
34+
- cargo install typst-cli git-cliff sd
2935
script:
3036
- typst compile --root=$CI_PROJECT_DIR --font-path=$CI_PROJECT_DIR/fonts $CI_PROJECT_DIR/template/thesis.typ $CI_PROJECT_DIR/thesis_preview.pdf
3137
# TODO(#1): the preview pdf should be generated by template repo

.gitlab/merge_request_templates/release.md

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
- [ ] 最后一个提交已更新 `CHANGELOG.md`:
1717
```sh
1818
git cliff --unreleased --tag $BUMPED_VERSION --prepend CHANGELOG.md -- --newest
19+
git add CHANGELOG.md
1920
```
2021
- [ ] 最后一个提交的提交信息符合 `chore(release): $BUMPED_VERSION`
2122
```sh

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [0.1.1-alpha.3] - 2024-05-17
6+
7+
### ⚙️ Miscellaneous Tasks
8+
9+
- *(gitlab-ci)* 修复CI脚本复用问题
10+
511
## [0.1.1-alpha.2] - 2024-05-17
612

713
### 📚 Documentation

typst.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "morden-sysu-thesis"
3-
version = "0.1.1-alpha.2"
3+
version = "0.1.1-alpha.3"
44
entrypoint = "lib.typ"
55
repository = "https://gitlab.com/sysu-gitlab/thesis-template/better-thesis"
66
authors = ["howardlau1999 <@howardlau1999>", "Sunny Huang <@huangjj27>"]

0 commit comments

Comments
 (0)