Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(github): 通过更改条件尝试在PR中分析流水线失败原因 #19

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ on: workflow_dispatch

jobs:
restore-tools:
if: github.ref_name == github.event.repository.default_branch
# if: github.ref_name == github.event.repository.default_branch
runs-on: ubuntu-latest
steps:
- id: toolchain
Expand Down Expand Up @@ -37,7 +37,7 @@ jobs:
~/.cargo/git/db/

bump-version:
if: github.ref_name == github.event.repository.default_branch
# if: github.ref_name == github.event.repository.default_branch
runs-on: ubuntu-latest
needs:
- restore-tools
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
run: git push origin

publish2universe:
if: github.ref_name == github.event.repository.default_branch
# if: github.ref_name == github.event.repository.default_branch
runs-on: ubuntu-latest
needs:
- bump-version
Expand Down Expand Up @@ -146,20 +146,25 @@ jobs:
fetch-tags: true
token: ${{ secrets.TYPST_PACKAGES_FORK_TOKEN }}
persist-credentials: true
path: sysu-packages
path: sysu-fork

- name: Store MODERN_SYSU_THESIS
run: |
MODERN_SYSU_THESIS=./sysu-fork/packages/preview/modern-sysu-thesis
echo "MODERN_SYSU_THESIS=$MODERN_SYSU_THESIS" >> $GITHUB_ENV

- name: switch new branch for Packages
working-directory: $MODERN_SYSU_THESIS
run: |
cd ./sysu-packages/preview/modern-sysu-thesis
git switch main
git switch -c $SEMVER

- name: create new version directory
run: |
mkdir $SEMVER
cd $SEMVER

- name: Copy project files
working-directory: $MODERN_SYSU_THESIS/$SEMVER
run: |
cp $CI_PROJECT_DIR/LICENSE .
cp $CI_PROJECT_DIR/README.md .
Expand All @@ -174,16 +179,19 @@ jobs:
cp -r $CI_PROJECT_DIR/template .

- name: Switch to preview import
working-directory: $MODERN_SYSU_THESIS/$SEMVER
run: |
sd '// #import "@preview/modern-sysu-thesis:' '#import "@preview/modern-sysu-thesis:' ./template/thesis.typ
sd '#import "/lib.typ":' '// #import "lib.typ":' ./template/thesis.typ

- name: Configure triger user for git
working-directory: $MODERN_SYSU_THESIS/$SEMVER
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"

- name: Commit to Packages
working-directory: $MODERN_SYSU_THESIS/$SEMVER
run: |
git status
git add .
Expand Down
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,41 @@

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

## [0.4.1] - 2025-03-06

### 📚 Documentation

- *(README)* 更新链接指向 GitHub

### ⚙️ Miscellaneous Tasks

- *(github)* 配置工作目录,修复命令执行工作目录错误问题
- *(github)* 输出各个步骤之后所在目录
- *(github)* Fix packages path
- *(github)* 通过更改条件尝试在PR中分析流水线失败原因
- *(github)* 修复代码仓库检出错误
- *(github)* 修复 release 分支设置 git 用户问题
- *(github)* 仅在 default_branch 上运行
- *(github)* 删去验证语义化标签,直接推送发布到 packages
- *(github)* 补充验证语义化版本标签流程
- *(github)* 修复 CI TOKEN 权限,以便后续流程可以自动触发
- *(github)* Configure git user for bump commit
- *(GitHub)* 删去 lfs 需求
- *(github)* 尝试使用默认 token 来排除 token 问题
- *(github)* 修复误传 GitLab CI 参数问题
- *(github)* Fix jobs' needs
- *(github)* Fix tag fetching
- *(github)* 迁移 GitLab 发版前 bump 版本流程
- *(github)* 流程文件重命名与文档优化
- *(github)* 每次执行刷新缓存
- *(github)* 修复多行命令问题
- *(github)* 修复未检出代码导致流水线失败
- *(github)* 修复缓存问题
- *(github)* 删去不需要的矩阵代码
- *(github)* 修复缓存 key 获取不正确问题
- *(github)* 替换 toolchain 与缓存流程指令
- *(github)* Add ci for pull requests to main branch

## [0.4.0] - 2025-02-22

### 🐛 Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion template/thesis.typ
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// 建议在正式编辑论文时,采用 typst.app 中的已发布版本模板
// #import "@preview/modern-sysu-thesis:0.4.0": bachelor as thesis
// #import "@preview/modern-sysu-thesis:0.4.1": bachelor as thesis

// 仅供开发调试使用
#import "/lib.typ": bachelor as thesis
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 = "modern-sysu-thesis"
version = "0.4.0"
version = "0.4.1"
entrypoint = "lib.typ"
repository = "https://gitlab.com/sysu-gitlab/thesis-template/better-thesis"
authors = ["howardlau1999 <@howardlau1999>", "Sunny Huang <@huangjj27>"]
Expand Down