Skip to content

Commit

Permalink
chore(merging): 'ci-collect-to-typst-package' into 'main'
Browse files Browse the repository at this point in the history
ci(typst.universe): 添加自动打包发布到 sysu/package 仓库的流水线

Closes #2

See merge request sysu-gitlab/thesis-template/better-thesis!21
  • Loading branch information
huangjj27 committed May 20, 2024
2 parents 1fb7d3b + f82cf49 commit b27479d
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .gitlab/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,43 @@ gitlab-release:
release:
tag_name: '$CI_COMMIT_TAG'
description: '$CI_COMMIT_TAG_MESSAGE'

typst.universe-release:
stage: release
rules:
- if: $CI_COMMIT_TAG
# - if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
before_script:
- export PATH="$PATH:$CARGO_HOME/bin"
- cargo install sd
- SEMVER=$(echo $CI_COMMIT_TAG | sd 'v(.*)' '$1')
- |
git clone https://sysu:[email protected]/sysu/packages.git typst-universe
- cd typst-universe/packages/preview/modern-sysu-thesis/
- |
git config user.name $GITLAB_USER_NAME
git config user.email $GITLAB_USER_EMAIL
script:
- |
git switch main
git switch -c $SEMVER
- |
mkdir $SEMVER
cd $SEMVER
- |
cp $CI_PROJECT_DIR/LICENSE .
cp $CI_PROJECT_DIR/README.md .
cp $CI_PROJECT_DIR/typst.toml .
cp $CI_PROJECT_DIR/thumbnail.png .
cp $CI_PROJECT_DIR/lib.typ .
cp -r $CI_PROJECT_DIR/assets .
cp -r $CI_PROJECT_DIR/layouts .
cp -r $CI_PROJECT_DIR/utils .
cp -r $CI_PROJECT_DIR/pages .
cp -r $CI_PROJECT_DIR/template .
- git status
- git add .
- git commit -m "chore(release):prepare for modern-sysu-thesis:$SEMVER"
- git push --set-upstream origin $SEMVER
after_script:
- rm -r typst-universe

0 comments on commit b27479d

Please sign in to comment.