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): 修复脚本问题

See merge request sysu-gitlab/thesis-template/better-thesis!4
  • Loading branch information
huangjj27 committed May 17, 2024
2 parents eaf09eb + adb13f7 commit b351623
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .gitlab/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ check-merge-request:
check-default-branch:
stage: check
rules:
- if: ($CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH) && ($CI_PIPELINE_SOURCE == "web")
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
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
Expand All @@ -39,13 +39,15 @@ release-commit:
- if: ($CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH) && ($CI_PIPELINE_SOURCE == "web")
script:
- git config user.name $GITLAB_USER_NAME && git config user.email $GITLAB_USER_EMAIL
- VERSION=$(git cliff --bumped-version --unrelease)
- git cliff --bump --unreleased > release-note.md
- |
VERSION=$(git cliff --bumped-version --unreleased)
git cliff --bump --unreleased > release-note.md
- |
sd 'version = ".*"' 'version = "$VERSION"' $CI_PROJECT_DIR/typst.toml
- git add . && git commit -m "ci(release):$VERSION"
- git tag $VERSION -m --file=release-note.md
- git push --tags
- |
git add . && git commit -m "ci(release):$VERSION"
git tag $VERSION -m --file=release-note.md
git push --tags
gitlab-release:
stage: release
Expand Down

0 comments on commit b351623

Please sign in to comment.