Skip to content

Commit b7265f7

Browse files
committed
chore(merging): 'ci-refactor-build-flow' into 'main'
ci(gitlab-ci): 更新打版命令 See merge request sysu-gitlab/thesis-template/better-thesis!16
2 parents bc18e32 + 0e9e5d9 commit b7265f7

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

.gitlab/ci.yml

+11-5
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,19 @@ release-commit:
4343
git config user.email $GITLAB_USER_EMAIL
4444
git remote set-url --push origin "https://sysu-bot:[email protected]/sysu-gitlab/thesis-template/better-thesis.git"
4545
- |
46-
VERSION=$(git cliff --bumped-version --unreleased)
47-
git cliff --bump --unreleased > release-note.md
46+
BUMPED_VERSION=$(git cliff --bumped-version --unreleased)
47+
git cliff --bump --unreleased -- --newest > release-note.md
4848
- |
49-
sd 'version = ".*"' 'version = "$VERSION"' $CI_PROJECT_DIR/typst.toml
49+
sd 'version = ".*"' 'version = "$BUMPED_VERSION"' $CI_PROJECT_DIR/typst.toml
50+
sd 'version = "v(.*)"' "version = \"$1\"" typst.toml
51+
git add $CI_PROJECT_DIR/typst.toml
52+
- |
53+
git cliff --unreleased --tag $BUMPED_VERSION --prepend CHANGELOG.md -- --newest
54+
git add $CI_PROJECT_DIR/CHANGELOG.md
5055
- |
51-
git add $CI_PROJECT_DIR/typst.toml && git commit -m "ci(release):$VERSION"
52-
git tag $VERSION -m --file=release-note.md
56+
git status
57+
git commit -m "chore(release): prepare for $BUMPED_VERSION"
58+
git tag $BUMPED_VERSION -m --file=release-note.md
5359
git push --tags
5460
5561
gitlab-release:

0 commit comments

Comments
 (0)