Skip to content

Commit 7c7de82

Browse files
committed
feat: 添加cmsis-pack目录用于存放GitHub Actions生成的pack文件
1 parent dd248b4 commit 7c7de82

File tree

3 files changed

+43
-2
lines changed

3 files changed

+43
-2
lines changed

.github/workflows/cmake-single-platform.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Build documentation and pack
22
on:
33
workflow_dispatch:
44
push:
5-
branches: [ CMSIS-Pack ]
5+
branches: [ develop ]
66
pull_request:
7-
branches: [ CMSIS-Pack ]
7+
branches: [ develop ]
88
release:
99
types: [published]
1010
jobs:
@@ -31,3 +31,24 @@ jobs:
3131
packchk-version: 1.3.96
3232
gen-pack-script: ./gen_pack.sh
3333
gen-pack-output: ./output
34+
35+
- name: Copy pack to cmsis-pack directory
36+
run: |
37+
mkdir -p cmsis-pack
38+
cp -v ./output/*.pack cmsis-pack/ || true
39+
40+
- name: Upload pack artifact
41+
uses: actions/upload-artifact@v3
42+
with:
43+
name: cmsis-pack
44+
path: cmsis-pack/*.pack
45+
if-no-files-found: warn
46+
47+
- name: Commit pack to repository
48+
if: github.event_name == 'push' && github.ref == 'refs/heads/develop'
49+
run: |
50+
git config user.name "github-actions[bot]"
51+
git config user.email "github-actions[bot]@users.noreply.github.com"
52+
git add cmsis-pack/*.pack
53+
git diff --staged --quiet || git commit -m "chore: Update CMSIS pack files [skip ci]"
54+
git push

cmsis-pack/.gitkeep

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# This directory stores CMSIS Pack files generated by GitHub Actions

cmsis-pack/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# CMSIS Pack 目录
2+
3+
此目录用于存放由 GitHub Actions 自动生成的 CMSIS Pack 文件。
4+
5+
## 自动生成流程
6+
7+
当代码推送到 `develop` 分支时,GitHub Actions 工作流会:
8+
9+
1. 运行 `gen_pack.sh` 脚本生成 CMSIS Pack
10+
2. 将生成的 `.pack` 文件复制到此目录
11+
3. 自动提交并推送到仓库
12+
13+
## 手动下载
14+
15+
你也可以从 GitHub Actions 的 Artifacts 中下载最新生成的 pack 文件。
16+
17+
## 文件说明
18+
19+
- `fool_cat.fc_embed.<version>.pack` - fc_embed 库的 CMSIS Pack 包

0 commit comments

Comments
 (0)