-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/增加更加完善的 CI / CD 流程,增加文档站,并修复一个小问题 #17
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
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
1c692ce
refactor!: 重构项目结构为标准 Go CLI 结构
YewFence c259e8b
ci(release): 使用 GoReleaser 重构构建与发布流程
YewFence 4a04bd6
docs: 增加 vitepress 文档站,简化 README
YewFence cc0e5a5
fix(orchestrator): 统一备份流程收尾,确保中止场景也上传日志并发送通知
YewFence 457b40a
test: 补充单测并增加 CI 流程
YewFence 2c9868e
fix(ci): 修复错误的 goreleaser 版本号与 pnpm/setup 的错误参数
YewFence 0bd644a
fix(orchestrator): 在所有错误中传递 finalErr 以在通知中显示明确信息
YewFence af4edcb
fix(ci): 将 docs CI 修正为使用 pnpm
YewFence 821b45a
docs: 同步配置加载与日志说明并修正文档示例
YewFence 45c89ef
fix(ci): 对齐 GoReleaser v2 并增强流水线一致性校验
YewFence 1d4392b
ci: 更新所有 action 的大版本至最新
YewFence 5ab098d
ci: 使用 pinact 锁定所有 action 版本
YewFence 313c33f
ci: 增加 pinact 检查 lefthook 以避免未 pin 的 action 提交
YewFence f83a81f
fix(pre-commit): 为 pinact token 设置失败增加降级告警
YewFence da7a4c7
docs: 更新 lefthook / pinact / ghtkn 开发依赖要求文档
YewFence 142bdea
ci: 更新 audit github action
YewFence 2f123d3
chore: 更新 Go 版本至 1.25.8 以修复标准库 audit 问题
YewFence File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # GoReleaser 环境变量配置 | ||
| # 正式发布时需要配置以下变量 | ||
|
|
||
| # GitHub Token(用于发布 Release 和推送 Docker 镜像到 GHCR) | ||
| GITHUB_TOKEN= | ||
|
|
||
| # Homebrew Tap 仓库配置 | ||
| HOMEBREW_TAP_NAME= | ||
| HOMEBREW_TAP_OWNER= | ||
| TAP_GITHUB_TOKEN= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: [main] | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| go: | ||
| name: Go | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
|
|
||
| - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | ||
| with: | ||
| go-version: "1.25.8" | ||
|
|
||
| - name: Check go.mod tidy | ||
| run: | | ||
| go mod tidy | ||
| git diff --exit-code go.mod go.sum | ||
|
|
||
| - name: Vet | ||
| run: go vet ./... | ||
|
|
||
| - name: Test | ||
| run: go test -v ./... | ||
|
|
||
| - name: Build | ||
| run: go build ./... | ||
|
|
||
| audit: | ||
| name: Audit | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
|
|
||
| - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | ||
| with: | ||
| go-version: "1.25.8" | ||
|
|
||
| - name: Verify dependencies | ||
| run: go mod verify | ||
|
|
||
| - id: govulncheck | ||
| uses: golang/govulncheck-action@b625fbe08f3bccbe446d94fbf87fcc875a4f50ee # v1.0.4 | ||
| with: | ||
| go-version-input: "1.25.8" | ||
| repo-checkout: false | ||
|
|
||
| docs: | ||
| name: Docs | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
|
|
||
| - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0 | ||
| with: | ||
| version: 10 | ||
|
|
||
| - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | ||
| with: | ||
| node-version: 22 | ||
| cache: pnpm | ||
| cache-dependency-path: docs/pnpm-lock.yaml | ||
|
|
||
| - name: Install dependencies | ||
| working-directory: docs | ||
| run: pnpm install --frozen-lockfile | ||
|
|
||
| - name: Build | ||
| working-directory: docs | ||
| run: pnpm build |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| name: Deploy Docs | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - "docs/**" | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pages: write | ||
| id-token: write | ||
|
|
||
| concurrency: | ||
| group: pages | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
|
|
||
| - name: Setup pnpm | ||
| uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0 | ||
| with: | ||
| version: 10 | ||
|
|
||
| - name: Setup Node | ||
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | ||
| with: | ||
| node-version: 22 | ||
| cache: pnpm | ||
| cache-dependency-path: docs/pnpm-lock.yaml | ||
|
|
||
| - name: Setup Pages | ||
| uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0 | ||
|
|
||
| - name: Install dependencies | ||
| working-directory: docs | ||
| run: pnpm install --frozen-lockfile | ||
|
|
||
| - name: Build with VitePress | ||
| working-directory: docs | ||
| run: pnpm build | ||
|
|
||
| - name: Upload artifact | ||
| uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0 | ||
| with: | ||
| path: docs/.vitepress/dist | ||
|
|
||
| deploy: | ||
| environment: | ||
| name: github-pages | ||
| url: ${{ steps.deployment.outputs.page_url }} | ||
| needs: build | ||
| runs-on: ubuntu-latest | ||
| name: Deploy | ||
| steps: | ||
| - name: Deploy to GitHub Pages | ||
| id: deployment | ||
| uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| name: Release | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - "v*" | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| jobs: | ||
| goreleaser: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | ||
| with: | ||
| go-version: "1.25.8" | ||
|
|
||
| - name: Run GoReleaser | ||
| uses: goreleaser/goreleaser-action@ec59f474b9834571250b370d4735c50f8e2d1e29 # v7.0.0 | ||
| with: | ||
| version: "~> v2" | ||
| args: release --clean | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| TAP_GITHUB_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }} | ||
| HOMEBREW_TAP_OWNER: ${{ vars.HOMEBREW_TAP_OWNER }} | ||
| HOMEBREW_TAP_NAME: ${{ vars.HOMEBREW_TAP_NAME }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,11 @@ | ||
| .env | ||
| yewresin.sh | ||
| .env.goreleaser | ||
| dist/ | ||
| *.exe | ||
| yewresin | ||
|
|
||
| .claude/ | ||
| docs/node_modules/ | ||
| docs/.vitepress/dist/ | ||
| docs/.vitepress/cache/ | ||
|
|
||
| .claude/ |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.