Release v1.4.2 测试生成readme.md
All checks were successful
自动版本发布 / AutoRelease (push) Successful in 15s
自动版本发布 / AutoREADME.md (push) Successful in 7s

This commit is contained in:
liyp 2025-04-12 16:51:40 +08:00
parent 97561ad360
commit 68c1b31848
2 changed files with 33 additions and 70 deletions

View File

@ -1,68 +0,0 @@
name: 自动生成README.md
on:
release:
types: [created]
branches: [main]
jobs:
create-readme:
# 工作在ubuntu-latest系统中
runs-on: ubuntu-latest
# 以下是steps
steps:
- name: 检出仓库
uses: https://git.linuxacme.com/iorebuild/checkout@v4
with:
fetch-depth: 0
# 启用子模块支持
submodules: false
- name: 设置环境变量
env:
CURRENT_USER_NAME: "iorebuild"
CURRENT_USER_EMAIL: "liyepan@linuxacme.com"
GITEA_REPO_URL: ${{ github.server_url }}/${{ github.repository }}
REPO_NAME: ${{ github.event.repository.name }}
run: |
git config user.name "$CURRENT_USER_NAME"
git config user.email "$CURRENT_USER_EMAIL"
echo "Name = $CURRENT_USER_NAME"
echo "Email = $CURRENT_USER_EMAIL"
# - name: 检出仓库
# env:
# GITEA_TOKEN: ${{ secrets.AUTOGENERATE }}
# GITEA_REPO_URL: ${{ github.server_url }}/${{ github.repository }}
# CLEAN_REPO_URL: ${{ github.server_url }}/${{ github.repository }}
# run: |
# CLEAN_REPO_URL="${CLEAN_REPO_URL#https://}"
# git clone "https://${GITEA_TOKEN}@${CLEAN_REPO_URL}" .
# - name: 生成版本号
# id: version
# run: |
# VERSION=$(date +'%Y%m%d%H%M%S')
# echo "version=$VERSION" >> $GITHUB_OUTPUT
# - name: 创建 Release
# run: |
# gh release create v${{ steps.version.outputs.version }} --generate-notes
# - name: 重新提交仓库
# env:
# GITEA_TOKEN: ${{ secrets.AUTOGENERATE }}
# GITEA_REPO_URL: ${{ github.server_url }}/${{ github.repository }}
# CLEAN_REPO_URL: ${{ github.server_url }}/${{ github.repository }}
# run: |
# 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 "AutoRelease.md"
# git push "https://${GITEA_TOKEN}@${CLEAN_REPO_URL}"
# fi

View File

@ -151,6 +151,37 @@ jobs:
# 以下是steps
steps:
- name: 获取最终Release信息
- name: 检出仓库
uses: https://git.linuxacme.com/iorebuild/checkout@v4
with:
fetch-depth: 0
# 启用子模块支持
submodules: false
- name: 设置环境变量
env:
CURRENT_USER_NAME: "iorebuild"
CURRENT_USER_EMAIL: "liyepan@linuxacme.com"
GITEA_REPO_URL: ${{ github.server_url }}/${{ github.repository }}
REPO_NAME: ${{ github.event.repository.name }}
run: |
echo "hello work"
git config user.name "$CURRENT_USER_NAME"
git config user.email "$CURRENT_USER_EMAIL"
echo "Name = $CURRENT_USER_NAME"
echo "Email = $CURRENT_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