Skip to content

Commit

Permalink
chore(merging): 'ci-refactor-build-flow' into 'main'
Browse files Browse the repository at this point in the history
ci(gitlab-ci): 修复 tag 标签检查发版流程触发逻辑

See merge request sysu-gitlab/thesis-template/better-thesis!13
  • Loading branch information
huangjj27 committed May 17, 2024
2 parents 81e2093 + 0edf23b commit 276b3a8
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 24 deletions.
29 changes: 7 additions & 22 deletions .gitlab/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ stages:
- release

# each merge request are required to ensure compiling the `.typ`s file successfully.
check-merge-request:
check-typst-compile:
stage: check
image: rust
variables:
Expand All @@ -13,25 +13,9 @@ check-merge-request:
- $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
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 && $CI_COMMIT_TAG
- if: $CI_COMMIT_TAG
when: manual
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: manual
before_script:
- export PATH="$PATH:$CARGO_HOME/bin"
Expand All @@ -51,8 +35,9 @@ gitlab-release:
stage: release
image: registry.gitlab.com/gitlab-org/release-cli:latest
rules:
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH && $CI_COMMIT_TAG
when: manual
- if: $CI_COMMIT_TAG
when: never
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
script:
- echo "releasing $CI_COMMIT_TAG on GitLab!"
release:
Expand Down
1 change: 0 additions & 1 deletion .gitlab/merge_request_templates/release.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
## 发布版本
这是一个发版新版本的 Merge Request,请确认已经完成以下操作:
- [ ] 该 PR 只有一个提交,并且发起 Merge Request 时已勾选 squash
- [ ] 通过 `git cliff --bumped-version` 命令生成新版本号 `$BUMPED_VERSION`:
```sh
BUMPED_VERSION=$(git cliff --bumped-version)
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

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

## [0.1.1-alpha.4] - 2024-05-17

### ⚙️ Miscellaneous Tasks

- *(gitlab-ci)* 修复 tag 标签检查发版流程触发逻辑
- *(template)* 修改发版 MR 模板

## [0.1.1-alpha.3] - 2024-05-17

### ⚙️ Miscellaneous Tasks
Expand Down
2 changes: 1 addition & 1 deletion typst.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "morden-sysu-thesis"
version = "0.1.1-alpha.3"
version = 0.1.1-alpha.4
entrypoint = "lib.typ"
repository = "https://gitlab.com/sysu-gitlab/thesis-template/better-thesis"
authors = ["howardlau1999 <@howardlau1999>", "Sunny Huang <@huangjj27>"]
Expand Down

0 comments on commit 276b3a8

Please sign in to comment.