Compare commits
229 Commits
Author | SHA1 | Date | |
---|---|---|---|
1d68192063 | |||
![]() |
e703563a28 | ||
![]() |
487514b8be | ||
![]() |
b3e65f43e3 | ||
![]() |
867cd2045a | ||
![]() |
15be01196a | ||
![]() |
ff54679db2 | ||
![]() |
b4c0ad07a7 | ||
![]() |
a6c02e7b26 | ||
![]() |
d3210c0625 | ||
![]() |
efc73c150c | ||
![]() |
0128150a83 | ||
![]() |
677dc32ff8 | ||
![]() |
eb9bf07005 | ||
![]() |
c8cae34cee | ||
![]() |
51b2f848ae | ||
3f68292ca9 | |||
a7833b51be | |||
a24ac414be | |||
8049629ad0 | |||
a4344deabe | |||
18052939db | |||
bd27f79cb3 | |||
8ebcbb9f85 | |||
1187ced8d4 | |||
78f479ee32 | |||
26f7da47a3 | |||
08e669f0a4 | |||
a43245639a | |||
7a9bac9c28 | |||
c41aaa19e7 | |||
feebbfb297 | |||
2a5dc32e95 | |||
2fa8e1e23c | |||
1218a12e79 | |||
546a75ff64 | |||
5ab5377b04 | |||
f47d1c2029 | |||
3af1760168 | |||
ef8ee16e4a | |||
48b87be58a | |||
4ab5f2e028 | |||
851647ab96 | |||
c773df0419 | |||
cca3ba2e52 | |||
4fb34f4729 | |||
dcbbc58edf | |||
ab3fc14c13 | |||
fb1d348cf6 | |||
bb7466baa8 | |||
59d94f522e | |||
1196a241d9 | |||
8e526f1757 | |||
2471d5ddc4 | |||
b6db04596f | |||
6e630d2a3b | |||
a85a067b70 | |||
b3a047eabb | |||
51fc66460d | |||
ea40d9ef3a | |||
4e3fb69023 | |||
b1b6e929eb | |||
f0d5562e13 | |||
![]() |
56c8139347 | ||
![]() |
9e763452b2 | ||
![]() |
4391b0cdb1 | ||
![]() |
21ff3acb2c | ||
![]() |
8c4e12b551 | ||
![]() |
6d839356a3 | ||
![]() |
7c60b3e77b | ||
![]() |
061d34382c | ||
![]() |
8fd082d8dc | ||
![]() |
540eaac53c | ||
![]() |
02c3be377b | ||
![]() |
635bcb1ecb | ||
![]() |
bdeab1b3c6 | ||
![]() |
fae28b8a70 | ||
![]() |
baf11b2501 | ||
![]() |
9079c05fd9 | ||
![]() |
fe31397610 | ||
![]() |
959bfac1cc | ||
![]() |
112a903f46 | ||
![]() |
8a75bc5c5d | ||
6752a337e1 | |||
![]() |
ddb0a5793d | ||
![]() |
172e66bf18 | ||
![]() |
0bc25a1c3b | ||
![]() |
336b7dd8e0 | ||
a546ab0d63 | |||
![]() |
c313d11e21 | ||
![]() |
a22b0ab83c | ||
![]() |
68c1b31848 | ||
![]() |
97561ad360 | ||
![]() |
c40266f7d7 | ||
![]() |
2312b52970 | ||
![]() |
ccd3c56392 | ||
![]() |
2d06b7d8fd | ||
![]() |
8e5b915632 | ||
![]() |
ef621a9bed | ||
e3dda45fa4 | |||
7699c9f77d | |||
7b8a6e1e5a | |||
cc0fc445f5 | |||
697432ead2 | |||
25fd20ab30 | |||
0089f01a6d | |||
b70fb353cf | |||
85804cedd1 | |||
b4f3c26803 | |||
bb9d97dd51 | |||
8bf30daae8 | |||
c406309b12 | |||
97f59591cd | |||
aebdf55617 | |||
1fd19fc09a | |||
9a2a6d9a04 | |||
6cfd715cb7 | |||
ddd10379d1 | |||
2c469a2bd7 | |||
a1346b15f5 | |||
3176a68e75 | |||
3e0ff13646 | |||
3045497fd9 | |||
b873a518bc | |||
d5229c4bea | |||
2076652971 | |||
72f047ea84 | |||
f3c9367a26 | |||
3b8034cda0 | |||
79b70cc06c | |||
1ec1a2c6c9 | |||
81aae1071b | |||
63aaf0b956 | |||
c040c73451 | |||
894da51993 | |||
8861294fed | |||
8c24ce7d93 | |||
341022cd21 | |||
99c12772f5 | |||
bd9ba97c50 | |||
682f734a0a | |||
763e8d79cb | |||
e5bb6fbd08 | |||
fee707d965 | |||
cdd9529a8c | |||
4ecf889019 | |||
852cafa146 | |||
ba7d364a91 | |||
655c36e335 | |||
436893bc16 | |||
ddc9c8ab51 | |||
2b45c9759c | |||
a3a9a1bd99 | |||
d2c6a9bb1f | |||
116fe546a6 | |||
1f6654d32a | |||
9f0cdc8b48 | |||
bea98a8f98 | |||
76e1f4a45e | |||
9dc2a54eb7 | |||
5ddfda604d | |||
3d34cbd82a | |||
9270db7de4 | |||
eda6cc2a96 | |||
8d1a62c020 | |||
abfb2958bb | |||
3840c4c28e | |||
4d6226306b | |||
79058d3c25 | |||
53636f02d4 | |||
179ac00bc7 | |||
a3d53c5caf | |||
4b5f7434a6 | |||
![]() |
0782130be5 | ||
![]() |
ebca94ebc3 | ||
![]() |
05c3d0270b | ||
![]() |
2496fca391 | ||
63aae4aa15 | |||
![]() |
c7e6e9b639 | ||
![]() |
27cf6c5fef | ||
f31739df7c | |||
![]() |
99c2a5eece | ||
c2cc7dce57 | |||
![]() |
0b6b12dcd0 | ||
![]() |
e33aa695c1 | ||
2184ff3a94 | |||
![]() |
8ee3641c18 | ||
be8449c62d | |||
![]() |
fec486727c | ||
![]() |
05c114dafb | ||
![]() |
b018cffbf6 | ||
2f20bdafcd | |||
![]() |
281644cf09 | ||
e67785b60a | |||
![]() |
7f9979cfae | ||
![]() |
90a4a25b06 | ||
![]() |
e731dd17f7 | ||
![]() |
f8a4f0ceb8 | ||
![]() |
951afe4e61 | ||
63959ee302 | |||
781a123347 | |||
02a9dcb480 | |||
3395cbdf87 | |||
![]() |
9896d69149 | ||
427211f071 | |||
07221b59e7 | |||
c390a8ba3d | |||
91fa941e05 | |||
cbb1e28557 | |||
93ee0409c6 | |||
e5004732f4 | |||
bf285a1769 | |||
a65e2bbf3a | |||
dd16448027 | |||
b4e8ba7735 | |||
23cd4d37c6 | |||
bb8546e9a8 | |||
3a07cc2840 | |||
![]() |
4a8f564adc | ||
![]() |
3e19558aea | ||
19f8f2eff9 | |||
![]() |
1283cb4a97 | ||
![]() |
8687b1fc85 | ||
45326ef72c | |||
ebac45bbe4 | |||
1c305d362a | |||
715d3f83cd | |||
![]() |
2cb29c46d2 | ||
![]() |
7fed578bd3 |
@ -1,57 +0,0 @@
|
||||
name: Create README with Commit History
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main # 可根据实际情况修改为你的默认分支,如 master
|
||||
|
||||
jobs:
|
||||
create-readme:
|
||||
runs-on: ubuntu-latest
|
||||
if: "!contains(github.event.head_commit.message, 'Create README with commit history')"
|
||||
|
||||
steps:
|
||||
- name: Checkout code from Gitea
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.AUTOGENERATE }}
|
||||
GITEA_REPO_URL: ${{ github.server_url }}/${{ github.repository }}
|
||||
CLEAN_REPO_URL: ${{ github.server_url }}/${{ github.repository }}
|
||||
run: |
|
||||
# 去除多余的 https://
|
||||
CLEAN_REPO_URL="${CLEAN_REPO_URL#https://}"
|
||||
git clone "https://${GITEA_TOKEN}@${CLEAN_REPO_URL}" .
|
||||
|
||||
- name: Delete existing README if exists
|
||||
run: |
|
||||
if [ -f README.md ]; then
|
||||
rm README.md
|
||||
fi
|
||||
|
||||
- name: Get commit history and write to README
|
||||
run: |
|
||||
# 获取仓库名称
|
||||
REPO_NAME=$(basename "$GITHUB_REPOSITORY" .git)
|
||||
# 写入仓库名称到 README
|
||||
echo "# $REPO_NAME" > README.md
|
||||
# 获取所有提交记录并追加到 README
|
||||
git log --pretty=format:"- %h %an %ad %s" --date=short >> README.md
|
||||
# 显示 README.md 的内容(可选,用于调试)
|
||||
cat README.md
|
||||
|
||||
- name: Commit and push changes
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.AUTOGENERATE }}
|
||||
GITEA_REPO_URL: ${{ github.server_url }}/${{ github.repository }}
|
||||
CLEAN_REPO_URL: ${{ github.server_url }}/${{ github.repository }}
|
||||
run: |
|
||||
# 去除多余的 https://
|
||||
CLEAN_REPO_URL="${CLEAN_REPO_URL#https://}"
|
||||
git config --local user.email "liyepan@linuxacme.com"
|
||||
git config --local user.name "iorebuild"
|
||||
git add README.md
|
||||
if git diff --staged --quiet; then
|
||||
echo "No changes to commit."
|
||||
else
|
||||
git commit -m "Create README with commit history"
|
||||
git push "https://${GITEA_TOKEN}@${CLEAN_REPO_URL}"
|
||||
fi
|
308
.gitea/workflows/AutoRelease.yaml
Normal file
308
.gitea/workflows/AutoRelease.yaml
Normal file
@ -0,0 +1,308 @@
|
||||
name: 自动版本发布
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
env:
|
||||
PROJECT_NAME: "私有仓库Action测试"
|
||||
DEVELOP_TOOLS: "Keil-V5.35.0.0"
|
||||
COMPILER: "V5.06 update 7(build960)"
|
||||
|
||||
jobs:
|
||||
AutoRelease:
|
||||
# 如果有Release标签则运行jobs
|
||||
if: "contains(github.event.head_commit.message, 'Release')"
|
||||
# 工作在ubuntu-latest系统中
|
||||
runs-on: ubuntu-latest
|
||||
# 以下是steps
|
||||
steps:
|
||||
- name: 检出仓库
|
||||
uses: https://git.linuxacme.com/iorebuild/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
# 启用子模块支持
|
||||
submodules: false
|
||||
|
||||
- name: 设置环境变量
|
||||
id: ActionEnv
|
||||
run: |
|
||||
#设置上海时间
|
||||
sudo ln -snf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
||||
|
||||
# 正确的变量赋值
|
||||
UserName="${{ github.actor }}"
|
||||
UserEmail=$(git log -1 --pretty=format:'%ae')
|
||||
GitRepo="${{ github.repository }}"
|
||||
ServerUrl="${{ github.server_url }}"
|
||||
RepoUrl="${{ github.repository }}"
|
||||
|
||||
# 将变量设置为步骤输出
|
||||
echo "ENV_USER_NAME=$UserName" >> $GITHUB_OUTPUT
|
||||
echo "ENV_USER_EMAIL=$UserEmail" >> $GITHUB_OUTPUT
|
||||
echo "ENV_REPO_NAME=$GitRepo" >> $GITHUB_OUTPUT
|
||||
echo "ENV_SERVER_URL=$ServerUrl" >> $GITHUB_OUTPUT
|
||||
echo "ENV_REPO_URL=$ServerUrl/$RepoUrl" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: 检查环境变量
|
||||
run: |
|
||||
echo "用户名 = ${{ steps.ActionEnv.outputs.ENV_USER_NAME }}"
|
||||
echo "邮箱= ${{ steps.ActionEnv.outputs.ENV_USER_EMAIL }}"
|
||||
echo "仓库名 = ${{ steps.ActionEnv.outputs.ENV_REPO_NAME }}"
|
||||
echo "服务器URL = ${{ steps.ActionEnv.outputs.ENV_SERVER_URL }}"
|
||||
echo "仓库URL = ${{ steps.ActionEnv.outputs.ENV_REPO_URL }}"
|
||||
|
||||
- name: 配置Git用户
|
||||
run: |
|
||||
git config user.name "${{ steps.ActionEnv.outputs.ENV_USER_NAME }}"
|
||||
git config user.email "${{ steps.ActionEnv.outputs.ENV_USER_EMAIL }}"
|
||||
|
||||
- name: 替换软件源为国内软件源(USTC)
|
||||
run: |
|
||||
cat /etc/os-release
|
||||
sudo rm -f /etc/apt/sources.list
|
||||
sudo rm -f /etc/apt/sources.list.d/*
|
||||
sudo tee /etc/apt/sources.list <<EOF
|
||||
deb http://mirrors.ustc.edu.cn/ubuntu/ noble main restricted universe multiverse
|
||||
deb-src http://mirrors.ustc.edu.cn/ubuntu/ noble main restricted universe multiverse
|
||||
deb http://mirrors.ustc.edu.cn/ubuntu/ noble-security main restricted universe multiverse
|
||||
deb-src http://mirrors.ustc.edu.cn/ubuntu/ noble-security main restricted universe multiverse
|
||||
deb http://mirrors.ustc.edu.cn/ubuntu/ noble-updates main restricted universe multiverse
|
||||
deb-src http://mirrors.ustc.edu.cn/ubuntu/ noble-updates main restricted universe multiverse
|
||||
deb http://mirrors.ustc.edu.cn/ubuntu/ noble-backports main restricted universe multiverse
|
||||
deb-src http://mirrors.ustc.edu.cn/ubuntu/ noble-backports main restricted universe multiverse
|
||||
EOF
|
||||
|
||||
- name: 从提交信息提取版本号
|
||||
id: extract_version
|
||||
run: |
|
||||
# 从提交信息中提取 vX.X.X 格式的版本号
|
||||
VERSION=$(echo "${{ github.event.head_commit.message }}" | grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+')
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
echo "提取到的版本号: $VERSION"
|
||||
|
||||
- name: 验证版本号
|
||||
run: |
|
||||
if [ -z "${{ steps.extract_version.outputs.version }}" ]; then
|
||||
echo "::error::提交信息中未找到有效的版本号 (示例: 'Release v1.0.1')"
|
||||
exit 1
|
||||
fi
|
||||
echo "${{ steps.extract_version.outputs.version }}"
|
||||
|
||||
- name: 创建并推送标签
|
||||
run: |
|
||||
git tag -a ${{ steps.extract_version.outputs.version }} -m "Release ${{ steps.extract_version.outputs.version }}"
|
||||
git push origin ${{ steps.extract_version.outputs.version }}
|
||||
|
||||
- name: 创建md5文件
|
||||
id: touch-md5-file
|
||||
run: |
|
||||
touch md5.txt
|
||||
|
||||
- name: 查找第1个.bin 文件
|
||||
id: find-bin-files-1
|
||||
run: |
|
||||
BIN_FILES=$(find ./Bin -name "*.bin" -print0 | tr '\0' ',')
|
||||
BIN_FILES=${BIN_FILES%,}
|
||||
md5sum $BIN_FILES >> md5.txt
|
||||
echo "bin_files=$BIN_FILES" >> $GITHUB_OUTPUT
|
||||
echo "bin_files=$BIN_FILES"
|
||||
- name: 查找第2个.bin 文件
|
||||
id: find-bin-files-2
|
||||
run: |
|
||||
BIN_FILES=$(find ./Bin1 -name "*.bin" -print0 | tr '\0' ',')
|
||||
BIN_FILES=${BIN_FILES%,}
|
||||
md5sum $BIN_FILES >> md5.txt
|
||||
echo "bin_files=$BIN_FILES" >> $GITHUB_OUTPUT
|
||||
- name: 查找第3个.bin 文件
|
||||
id: find-bin-files-3
|
||||
run: |
|
||||
BIN_FILES=$(find ./Bin2 -name "*.bin" -print0 | tr '\0' ',')
|
||||
BIN_FILES=${BIN_FILES%,}
|
||||
md5sum $BIN_FILES >> md5.txt
|
||||
echo "bin_files=$BIN_FILES" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: 输出md5文件
|
||||
id: output-md5-file
|
||||
run: |
|
||||
MD5_FILE=md5.txt
|
||||
echo "md5_result=$MD5_FILE" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: 获取上次发布标签
|
||||
id: get-previous-tag
|
||||
run: |
|
||||
PREVIOUS_TAG=$(git tag --sort=-creatordate | sed -n '2p')
|
||||
if [ -z "$PREVIOUS_TAG" ]; then
|
||||
PREVIOUS_TAG="HEAD~1" # 如果没有上次标签,使用上一次提交
|
||||
fi
|
||||
echo "previous_tag=$PREVIOUS_TAG" >> $GITHUB_OUTPUT
|
||||
echo "$PREVIOUS_TAG"
|
||||
|
||||
- name: 获取提交记录
|
||||
id: get-commit-log
|
||||
run: |
|
||||
# 获取指定标签到当前提交之间的提交记录,并按特定格式输出,同时过滤掉包含 'Update README.md' 的记录
|
||||
COMMIT_LOG=$(git log ${{ steps.get-previous-tag.outputs.previous_tag }}..HEAD --pretty=format:"- %s (%h)" | grep -v 'Update README.md' | tr '\n' '\r')
|
||||
# 将 COMMIT_LOG 变量的值输出到 GitHub Actions 的输出中
|
||||
echo "commit_log=$COMMIT_LOG" >> $GITHUB_OUTPUT
|
||||
# 打印 COMMIT_LOG 变量的值,方便调试查看
|
||||
echo "commit_log=$COMMIT_LOG"
|
||||
|
||||
- name: 解析Release标题
|
||||
id: parse-release
|
||||
run: |
|
||||
commit_message="${{ github.event.head_commit.message }}"
|
||||
title=$(echo "$commit_message" | cut -d ' ' -f 3-)
|
||||
if [ -z "$title" ]; then
|
||||
echo "未在提交信息中找到 Release 标题。"
|
||||
title="default_title"
|
||||
fi
|
||||
# 使用新语法设置输出
|
||||
echo "title=$title" >> $GITHUB_OUTPUT
|
||||
echo "title=$title"
|
||||
|
||||
- name: 获取最终Release信息
|
||||
run: |
|
||||
echo "Repo_Name = ${{ steps.ActionEnv.outputs.ENV_REPO_NAME }}"
|
||||
echo "Repo_Url = ${{ steps.ActionEnv.outputs.ENV_REPO_URL }}"
|
||||
echo "Tag_Name = ${{ steps.extract_version.outputs.version }}"
|
||||
echo "Release_Name = ${{ steps.parse-release.outputs.title }}"
|
||||
echo "Release_version = ${{ steps.extract_version.outputs.version }}"
|
||||
echo "Body = ${{ steps.get-commit-log.outputs.commit_log }}"
|
||||
|
||||
- name: 创建Gitea发布
|
||||
uses: https://git.linuxacme.com/iorebuild/gitea-release-action@main
|
||||
with:
|
||||
gitea_token: ${{ secrets.AUTOGENERATE }}
|
||||
gitea_instance_url: ${{ steps.ActionEnv.outputs.ENV_SERVER_URL }}
|
||||
repository: ${{ steps.ActionEnv.outputs.ENV_REPO_NAME }}
|
||||
name: ${{ steps.parse-release.outputs.title }}
|
||||
tag_name: ${{ steps.extract_version.outputs.version }}
|
||||
body: |
|
||||
${{ steps.get-commit-log.outputs.commit_log }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
files: |
|
||||
${{ steps.output-md5-file.outputs.md5_result }}
|
||||
${{ steps.find-bin-files-1.outputs.bin_files }}
|
||||
${{ steps.find-bin-files-2.outputs.bin_files }}
|
||||
${{ steps.find-bin-files-3.outputs.bin_files }}
|
||||
|
||||
AutoREADME.md:
|
||||
# 工作在ubuntu-latest系统中
|
||||
runs-on: ubuntu-latest
|
||||
# 以下是steps
|
||||
steps:
|
||||
|
||||
- name: 检出仓库
|
||||
uses: https://git.linuxacme.com/iorebuild/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
# 启用子模块支持
|
||||
submodules: false
|
||||
|
||||
- name: 设置环境变量
|
||||
id: ActionEnv
|
||||
run: |
|
||||
#设置上海时间
|
||||
sudo ln -snf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
||||
|
||||
# 正确的变量赋值
|
||||
UserName="${{ github.actor }}"
|
||||
UserEmail=$(git log -1 --pretty=format:'%ae')
|
||||
GitRepo="${{ github.repository }}"
|
||||
ServerUrl="${{ github.server_url }}"
|
||||
RepoUrl="${{ github.repository }}"
|
||||
|
||||
# 将变量设置为步骤输出
|
||||
echo "ENV_USER_NAME=$UserName" >> $GITHUB_OUTPUT
|
||||
echo "ENV_USER_EMAIL=$UserEmail" >> $GITHUB_OUTPUT
|
||||
echo "ENV_REPO_NAME=$GitRepo" >> $GITHUB_OUTPUT
|
||||
echo "ENV_SERVER_URL=$ServerUrl" >> $GITHUB_OUTPUT
|
||||
echo "ENV_REPO_URL=$ServerUrl/$RepoUrl" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: 检查环境变量
|
||||
run: |
|
||||
echo "用户名 = ${{ steps.ActionEnv.outputs.ENV_USER_NAME }}"
|
||||
echo "邮箱= ${{ steps.ActionEnv.outputs.ENV_USER_EMAIL }}"
|
||||
echo "仓库名 = ${{ steps.ActionEnv.outputs.ENV_REPO_NAME }}"
|
||||
echo "服务器URL = ${{ steps.ActionEnv.outputs.ENV_SERVER_URL }}"
|
||||
echo "仓库URL = ${{ steps.ActionEnv.outputs.ENV_REPO_URL }}"
|
||||
|
||||
- name: 配置Git用户
|
||||
run: |
|
||||
git config user.name "${{ steps.ActionEnv.outputs.ENV_USER_NAME }}"
|
||||
git config user.email "${{ steps.ActionEnv.outputs.ENV_USER_EMAIL }}"
|
||||
|
||||
- name: 替换软件源为国内软件源(USTC)
|
||||
run: |
|
||||
cat /etc/os-release
|
||||
sudo rm -f /etc/apt/sources.list
|
||||
sudo rm -f /etc/apt/sources.list.d/*
|
||||
sudo tee /etc/apt/sources.list <<EOF
|
||||
deb http://mirrors.ustc.edu.cn/ubuntu/ noble main restricted universe multiverse
|
||||
deb-src http://mirrors.ustc.edu.cn/ubuntu/ noble main restricted universe multiverse
|
||||
deb http://mirrors.ustc.edu.cn/ubuntu/ noble-security main restricted universe multiverse
|
||||
deb-src http://mirrors.ustc.edu.cn/ubuntu/ noble-security main restricted universe multiverse
|
||||
deb http://mirrors.ustc.edu.cn/ubuntu/ noble-updates main restricted universe multiverse
|
||||
deb-src http://mirrors.ustc.edu.cn/ubuntu/ noble-updates main restricted universe multiverse
|
||||
deb http://mirrors.ustc.edu.cn/ubuntu/ noble-backports main restricted universe multiverse
|
||||
deb-src http://mirrors.ustc.edu.cn/ubuntu/ noble-backports main restricted universe multiverse
|
||||
EOF
|
||||
|
||||
- name: 如果有README文件存在则删除掉
|
||||
run: |
|
||||
if [ -f "README.md" ]; then
|
||||
rm README.md
|
||||
echo "README.md has been removed."
|
||||
else
|
||||
echo "README.md does not exist."
|
||||
fi
|
||||
|
||||
- name: 获取所有Release信息
|
||||
id: fetch-releases
|
||||
run: |
|
||||
# 使用 Gitea API 获取所有 Release 信息
|
||||
RepoInfo=${{ steps.ActionEnv.outputs.ENV_SERVER_URL }}/api/v1/repos/${{ steps.ActionEnv.outputs.ENV_REPO_NAME }}/releases
|
||||
echo "$RepoInfo"
|
||||
# 发送请求获取所有 release 信息,添加认证信息
|
||||
Releases=$(curl -s -H "Authorization: token ${{ secrets.AUTOGENERATE }}" "$RepoInfo")
|
||||
echo "$Releases"
|
||||
|
||||
# 检查是否成功获取信息
|
||||
if [ -z "$Releases" ]; then
|
||||
echo "Failed to fetch Releases."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 生成 Markdown 内容
|
||||
markdown_content="# $PROJECT_NAME\n\n"
|
||||
markdown_content+="### Develop Tools\n\n"
|
||||
markdown_content+=" $DEVELOP_TOOLS\n\n"
|
||||
markdown_content+="### Compiler Version\n\n"
|
||||
markdown_content+=" $COMPILER\n\n"
|
||||
|
||||
# 使用 jq 直接解析 JSON 并处理
|
||||
while IFS= read -r row; do
|
||||
tag_name=$(echo "$row" | jq -r '.tag_name')
|
||||
name=$(echo "$row" | jq -r '.name')
|
||||
body=$(echo "$row" | jq -r '.body')
|
||||
published_at=$(echo "$row" | jq -r '.published_at')
|
||||
|
||||
# 将 ISO 8601 格式的时间转换为指定格式
|
||||
formatted_time=$(date -d "$published_at" +"Release at: %Y-%m-%d %H:%M:%S")
|
||||
|
||||
markdown_content+="## ${name} (${tag_name})\n"
|
||||
markdown_content+="${formatted_time}\n\n"
|
||||
markdown_content+="${body}\n\n"
|
||||
done < <(echo "$Releases" | jq -c '.[]')
|
||||
|
||||
# 将 Markdown 内容添加到 README.md 文件中
|
||||
echo -e "$markdown_content" >> README.md
|
||||
|
||||
- name: 提交和推送代码
|
||||
run: |
|
||||
git add README.md
|
||||
git commit -m "Update README.md"
|
||||
git push https://${{ secrets.AUTOGENERATE }}@git.linuxacme.com/${{ steps.ActionEnv.outputs.ENV_REPO_NAME }}
|
BIN
Bin/VoiletWindowsActionTool.bin
Normal file
BIN
Bin/VoiletWindowsActionTool.bin
Normal file
Binary file not shown.
BIN
Bin1/VoiletWindowsActionTool1.bin
Normal file
BIN
Bin1/VoiletWindowsActionTool1.bin
Normal file
Binary file not shown.
BIN
Bin2/VoiletWindowsActionTool2.bin
Normal file
BIN
Bin2/VoiletWindowsActionTool2.bin
Normal file
Binary file not shown.
197
README.md
197
README.md
@ -1,36 +1,161 @@
|
||||
# ActionDemo
|
||||
- a454104 liyp 2025-04-10 Merge branch 'main' of https://git.linuxacme.com/iorebuild/ActionDemo
|
||||
- 3f3eeb9 GitHub Action 2025-04-10 Create README with repository name
|
||||
- 2d4e6cf liyp 2025-04-10 避免重复action
|
||||
- 9019416 GitHub Action 2025-04-10 Create README with repository name
|
||||
- e721d3b GitHub Action 2025-04-10 Create README with repository name
|
||||
- 8ae13bf GitHub Action 2025-04-10 Create README with repository name
|
||||
- f832cbf GitHub Action 2025-04-10 Create README with repository name
|
||||
- 787f0ba GitHub Action 2025-04-10 Create README with repository name
|
||||
- 08a8f2e GitHub Action 2025-04-10 Create README with repository name
|
||||
- cdab4e9 GitHub Action 2025-04-10 Create README with repository name
|
||||
- 622953e GitHub Action 2025-04-10 Create README with repository name
|
||||
- d311e5d GitHub Action 2025-04-10 Create README with repository name
|
||||
- f0941de GitHub Action 2025-04-10 Create README with repository name
|
||||
- 253d268 GitHub Action 2025-04-10 Create README with repository name
|
||||
- fbb618e GitHub Action 2025-04-10 Create README with repository name
|
||||
- 620af8f liyp 2025-04-10 Merge branch 'main' of https://git.linuxacme.com/iorebuild/ActionDemo
|
||||
- 40e9bd9 liyp 2025-04-10 读取仓库历史记录
|
||||
- f1fbd3d GitHub Action 2025-04-10 Create README with repository name
|
||||
- d8d21b6 liyp 2025-04-10 重写commit
|
||||
- a134b01 liyp 2025-04-10 重写steps
|
||||
- f7d7f72 liyp 2025-04-10 clone多了一个htpps
|
||||
- b5d7270 liyp 2025-04-10 重写toml文件
|
||||
- 833d91c liyp 2025-04-10 使用gitta
|
||||
- d70e5af liyp 2025-04-10 action添加密钥
|
||||
- 0000cf6 liyp 2025-04-10 使用v1
|
||||
- 260c81d liyp 2025-04-10 使用act提供的checkout
|
||||
- d365f8f liyp 2025-04-10 deepseek重写toml文件
|
||||
- 4796ddf liyp 2025-04-10 打印变量信息
|
||||
- 68480ca liyp 2025-04-10 忘记添加仓库用户名
|
||||
- 484058e liyp 2025-04-10 使用仓库令牌生成readme
|
||||
- 7103e23 liyp 2025-04-10 理解了什么意思,拉取我自己的actiondemo仓库
|
||||
- 4546eb0 liyp 2025-04-10 拉取checkout所有记录
|
||||
- 4b36f8d liyp 2025-04-10 从gitea拉取checkout仓库
|
||||
- b583d90 liyp 2025-04-10 测试自动生成readme
|
||||
- c4f2986 liyp 2025-04-10 测试ActRunner
|
||||
# 私有仓库Action测试
|
||||
|
||||
### Develop Tools
|
||||
|
||||
Keil-V5.35.0.0
|
||||
|
||||
### Compiler Version
|
||||
|
||||
V5.06 update 7(build960)
|
||||
|
||||
## 测试md5 (v1.9.6)
|
||||
Release at: 2025-05-15 13:03:28
|
||||
|
||||
- Release v1.9.6 测试md5 (487514b)
|
||||
|
||||
## (v1.9.5)
|
||||
Release at: 2025-05-15 13:02:27
|
||||
|
||||
- Merge branch 'main' of https://git.linuxacme.com/iorebuild/ActionDemo Release v1.9.5 测试md5 (867cd20)
- Release v1.9.5 测试md5 (15be011)
|
||||
|
||||
## 测试md5 (v1.9.4)
|
||||
Release at: 2025-05-15 12:59:56
|
||||
|
||||
- Release v1.9.4 测试md5 (b4c0ad0)
|
||||
|
||||
## 测试多次提交 (v1.9.0)
|
||||
Release at: 2025-04-26 16:30:00
|
||||
|
||||
- Release v1.9.0 测试多次提交 (eb9bf07)
- 添加第二个文件 (c8cae34)
- 添加第一个文件 (51b2f84)
|
||||
|
||||
## 测试生成readme.md (v1.8.9)
|
||||
Release at: 2025-04-13 10:37:24
|
||||
|
||||
- Release v1.8.9 测试生成readme.md (a7833b5)
|
||||
|
||||
## 测试生成readme.md (v1.8.8)
|
||||
Release at: 2025-04-13 10:35:10
|
||||
|
||||
- Release v1.8.8 测试生成readme.md (8049629)
|
||||
|
||||
## 测试生成readme.md (v1.8.7)
|
||||
Release at: 2025-04-13 10:30:45
|
||||
|
||||
- Release v1.8.7 测试生成readme.md (1805293)
|
||||
|
||||
## 测试生成readme.md (v1.8.6)
|
||||
Release at: 2025-04-13 10:27:49
|
||||
|
||||
- Release v1.8.6 测试生成readme.md (8ebcbb9)
|
||||
|
||||
## 测试生成readme.md (v1.8.5)
|
||||
Release at: 2025-04-13 10:21:26
|
||||
|
||||
- Release v1.8.5 测试生成readme.md (78f479e)
- Update README.md (26f7da4)
- 使用统一的仓库名字Release v1.8.4 测试生成readme.md (08e669f)
- Update README.md (a432456)
|
||||
|
||||
## 测试生成readme.md (v1.8.3)
|
||||
Release at: 2025-04-13 10:10:46
|
||||
|
||||
- Release v1.8.3 测试生成readme.md (feebbfb)
- Update README.md (2a5dc32)
|
||||
|
||||
## 测试生成readme.md (v1.8.2)
|
||||
Release at: 2025-04-13 10:06:54
|
||||
|
||||
- Release v1.8.2 测试生成readme.md (2fa8e1e)
- Update README.md (1218a12)
|
||||
|
||||
## 测试生成readme.md (v1.8.1)
|
||||
Release at: 2025-04-13 10:03:28
|
||||
|
||||
- Release v1.8.1 测试生成readme.md (546a75f)
|
||||
|
||||
## 测试生成readme.md (v1.8.0)
|
||||
Release at: 2025-04-13 10:00:42
|
||||
|
||||
- Release v1.8.0 测试生成readme.md (5ab5377)
|
||||
|
||||
## 测试生成readme.md (v1.7.9)
|
||||
Release at: 2025-04-13 09:58:31
|
||||
|
||||
- Release v1.7.9 测试生成readme.md (f47d1c2)
|
||||
|
||||
## 测试生成readme.md (v1.7.6)
|
||||
Release at: 2025-04-13 09:56:44
|
||||
|
||||
- Release v1.7.6 测试生成readme.md (3af1760)
- Update README.md (ef8ee16)
|
||||
|
||||
## 测试生成readme.md (v1.7.5)
|
||||
Release at: 2025-04-13 09:53:49
|
||||
|
||||
- Release v1.7.5 测试生成readme.md (48b87be)
|
||||
|
||||
## 测试生成readme.md (v1.7.4)
|
||||
Release at: 2025-04-13 09:49:09
|
||||
|
||||
- Release v1.7.4 测试生成readme.md (4ab5f2e)
|
||||
|
||||
## 测试生成readme.md (v1.7.3)
|
||||
Release at: 2025-04-13 09:47:49
|
||||
|
||||
- Release v1.7.3 测试生成readme.md (851647a)
|
||||
|
||||
## 测试生成readme.md (v1.7.2)
|
||||
Release at: 2025-04-13 09:44:34
|
||||
|
||||
- Release v1.7.2 测试生成readme.md (c773df0)
|
||||
|
||||
## 测试生成readme.md (v1.7.1)
|
||||
Release at: 2025-04-13 09:42:15
|
||||
|
||||
- Release v1.7.1 测试生成readme.md (cca3ba2)
|
||||
|
||||
## 测试生成readme.md (v1.7.0)
|
||||
Release at: 2025-04-13 09:40:01
|
||||
|
||||
- Release v1.7.0 测试生成readme.md (4fb34f4)
|
||||
|
||||
## 测试生成readme.md (v1.6.9)
|
||||
Release at: 2025-04-13 09:37:34
|
||||
|
||||
- Release v1.6.9 测试生成readme.md (dcbbc58)
|
||||
|
||||
## 测试生成readme.md (v1.6.8)
|
||||
Release at: 2025-04-12 22:03:48
|
||||
|
||||
- Release v1.6.8 测试生成readme.md (ab3fc14)
|
||||
|
||||
## 测试生成readme.md (v1.6.7)
|
||||
Release at: 2025-04-12 21:58:49
|
||||
|
||||
- Release v1.6.7 测试生成readme.md (fb1d348)
|
||||
|
||||
## 测试生成readme.md (v1.6.5)
|
||||
Release at: 2025-04-12 21:55:59
|
||||
|
||||
- Release v1.6.5 测试生成readme.md (bb7466b)
|
||||
|
||||
## 测试生成readme.md (v1.6.0)
|
||||
Release at: 2025-04-12 20:31:23
|
||||
|
||||
- Release v1.6.0 测试生成readme.md (8fd082d)
|
||||
|
||||
## 测试生成readme.md (v1.5.9)
|
||||
Release at: 2025-04-12 20:27:38
|
||||
|
||||
- Release v1.5.9 测试生成readme.md (540eaac)
|
||||
|
||||
## 测试生成readme.md (v1.5.8)
|
||||
Release at: 2025-04-12 20:24:31
|
||||
|
||||
- Release v1.5.8 测试生成readme.md (02c3be3)
|
||||
|
||||
## 测试生成readme.md (v1.5.7)
|
||||
Release at: 2025-04-12 20:18:06
|
||||
|
||||
- Release v1.5.7 测试生成readme.md (635bcb1)
- Release v1.5.6 测试生成readme.md (bdeab1b)
- Release v1.5.5 测试生成readme.md (fae28b8)
|
||||
|
||||
## 测试生成readme.md (v1.5.3)
|
||||
Release at: 2025-04-12 19:09:51
|
||||
|
||||
- Release v1.5.3 测试生成readme.md (baf11b2)
|
||||
|
||||
|
||||
|
0
a (2).txt
Normal file
0
a (2).txt
Normal file
0
a.txt
Normal file
0
a.txt
Normal file
BIN
vJoySetup(1).exe
Normal file
BIN
vJoySetup(1).exe
Normal file
Binary file not shown.
BIN
新建 Microsoft Excel 工作表.xlsx
Normal file
BIN
新建 Microsoft Excel 工作表.xlsx
Normal file
Binary file not shown.
0
新建 文本文档 (2).txt
Normal file
0
新建 文本文档 (2).txt
Normal file
0
新建 文本文档 (3).txt
Normal file
0
新建 文本文档 (3).txt
Normal file
0
新建 文本文档 (4).txt
Normal file
0
新建 文本文档 (4).txt
Normal file
0
新建 文本文档 (5).txt
Normal file
0
新建 文本文档 (5).txt
Normal file
0
新建 文本文档.txt
Normal file
0
新建 文本文档.txt
Normal file
0
新建文本文档 (2).txt
Normal file
0
新建文本文档 (2).txt
Normal file
0
新建文本文档 (3).txt
Normal file
0
新建文本文档 (3).txt
Normal file
0
新建文本文档.txt
Normal file
0
新建文本文档.txt
Normal file
Loading…
x
Reference in New Issue
Block a user