mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2026-06-08 04:48:10 +08:00
fix: 调整工具包目录
This commit is contained in:
parent
f0560ddcb5
commit
21df7baea4
0
bin/release.sh → .github/release.sh
vendored
Executable file → Normal file
0
bin/release.sh → .github/release.sh
vendored
Executable file → Normal file
2
bin/split-linux.sh → .github/split-linux.sh
vendored
Executable file → Normal file
2
bin/split-linux.sh → .github/split-linux.sh
vendored
Executable file → Normal file
@ -6,7 +6,7 @@ BASEPATH=$(cd `dirname $0`; cd ../plugin/; pwd)
|
|||||||
REPOS=$@
|
REPOS=$@
|
||||||
function split()
|
function split()
|
||||||
{
|
{
|
||||||
SHA1=`./bin/splitsh-lite-linux --prefix=$1`
|
SHA1=`.github/splitsh-lite-linux --prefix=$1`
|
||||||
git push $2 "$SHA1:refs/heads/$CURRENT_BRANCH" -f
|
git push $2 "$SHA1:refs/heads/$CURRENT_BRANCH" -f
|
||||||
}
|
}
|
||||||
|
|
||||||
0
bin/splitsh-lite-linux → .github/splitsh-lite-linux
vendored
Executable file → Normal file
0
bin/splitsh-lite-linux → .github/splitsh-lite-linux
vendored
Executable file → Normal file
2
.github/workflows/clear.yml
vendored
2
.github/workflows/clear.yml
vendored
@ -22,4 +22,4 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
python .github/delete_tags_and_releases.py
|
python .github/clear-releases.py
|
||||||
154
.github/workflows/release.yml
vendored
154
.github/workflows/release.yml
vendored
@ -1,78 +1,78 @@
|
|||||||
####### 可解析的提交前缀 ########
|
####### 可解析的提交前缀 ########
|
||||||
# ci: 持续集成
|
# ci: 持续集成
|
||||||
# fix: 修改
|
# fix: 修改
|
||||||
# feat: 新增
|
# feat: 新增
|
||||||
# refactor: 重构
|
# refactor: 重构
|
||||||
# docs: 文档
|
# docs: 文档
|
||||||
# style: 样式
|
# style: 样式
|
||||||
# chore: 其他
|
# chore: 其他
|
||||||
# build: 构建
|
# build: 构建
|
||||||
# pref: 优化
|
# pref: 优化
|
||||||
# test: 测试
|
# test: 测试
|
||||||
###############################
|
###############################
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
# Sequence of patterns matched against refs/tags
|
# Sequence of patterns matched against refs/tags
|
||||||
tags:
|
tags:
|
||||||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
||||||
|
|
||||||
name: Create Release
|
name: Create Release
|
||||||
permissions: write-all
|
permissions: write-all
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 18
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm install -g gen-git-log
|
run: npm install -g gen-git-log
|
||||||
|
|
||||||
- name: Find Last Tag
|
- name: Find Last Tag
|
||||||
id: last_tag
|
id: last_tag
|
||||||
run: |
|
run: |
|
||||||
|
|
||||||
# 获取所有标签,按版本排序(降序)
|
# 获取所有标签,按版本排序(降序)
|
||||||
Tags=$(git tag --list --sort=-version:refname)
|
Tags=$(git tag --list --sort=-version:refname)
|
||||||
|
|
||||||
# 获取最新的标签(即列表中的第一个)
|
# 获取最新的标签(即列表中的第一个)
|
||||||
LATEST_TAG=$(echo "$Tags" | awk 'NR==1 {print $1; exit}')
|
LATEST_TAG=$(echo "$Tags" | awk 'NR==1 {print $1; exit}')
|
||||||
|
|
||||||
# 获取倒数第二个标签(如果存在)
|
# 获取倒数第二个标签(如果存在)
|
||||||
if [[ -n "$Tags" ]]; then
|
if [[ -n "$Tags" ]]; then
|
||||||
# 使用 tail 获取除了最后一个标签之外的所有标签,然后用 head 获取第一个
|
# 使用 tail 获取除了最后一个标签之外的所有标签,然后用 head 获取第一个
|
||||||
SECOND_LATEST_TAG=$(echo "$Tags" | tail -n +2 | head -n 1)
|
SECOND_LATEST_TAG=$(echo "$Tags" | tail -n +2 | head -n 1)
|
||||||
else
|
else
|
||||||
SECOND_LATEST_TAG=""
|
SECOND_LATEST_TAG=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 设置输出变量
|
# 设置输出变量
|
||||||
echo "::set-output name=tag_last::${LATEST_TAG:-v1.0.0}"
|
echo "::set-output name=tag_last::${LATEST_TAG:-v1.0.0}"
|
||||||
echo "::set-output name=tag_second::${SECOND_LATEST_TAG:-v1.0.0}"
|
echo "::set-output name=tag_second::${SECOND_LATEST_TAG:-v1.0.0}"
|
||||||
|
|
||||||
- name: Generate Release Notes
|
- name: Generate Release Notes
|
||||||
run: |
|
run: |
|
||||||
rm -rf log
|
rm -rf log
|
||||||
newTag=${{ steps.last_tag.outputs.tag_last }}
|
newTag=${{ steps.last_tag.outputs.tag_last }}
|
||||||
git-log -m tag -f -S ${{ steps.last_tag.outputs.tag_second }} -v ${newTag#v}
|
git-log -m tag -f -S ${{ steps.last_tag.outputs.tag_second }} -v ${newTag#v}
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
id: create_release
|
id: create_release
|
||||||
uses: actions/create-release@v1
|
uses: actions/create-release@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ steps.last_tag.outputs.tag_last }}
|
tag_name: ${{ steps.last_tag.outputs.tag_last }}
|
||||||
release_name: Release ${{ steps.last_tag.outputs.tag_last }}
|
release_name: Release ${{ steps.last_tag.outputs.tag_last }}
|
||||||
body_path: log/${{steps.last_tag.outputs.tag_last}}.md
|
body_path: log/${{steps.last_tag.outputs.tag_last}}.md
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
2
.github/workflows/split.yml
vendored
2
.github/workflows/split.yml
vendored
@ -24,4 +24,4 @@ jobs:
|
|||||||
git config pull.rebase true
|
git config pull.rebase true
|
||||||
git config --global user.name "Anyon"
|
git config --global user.name "Anyon"
|
||||||
git config --global user.email "zoujingli@qq.com"
|
git config --global user.email "zoujingli@qq.com"
|
||||||
./bin/split-linux.sh
|
./.github/split-linux.sh
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user