mirror of
https://github.com/juewuy/ShellCrash.git
synced 2026-10-24 03:39:55 +00:00
~调整版本号获取方式
This commit is contained in:
@@ -83,12 +83,24 @@ jobs:
|
|||||||
|
|
||||||
- name: get sing-box version
|
- name: get sing-box version
|
||||||
id: sing-box
|
id: sing-box
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ github.token }}
|
||||||
run: |
|
run: |
|
||||||
git remote add sekai https://github.com/SagerNet/sing-box.git
|
if [ "$REPO" = 'SagerNet/sing-box' ]; then
|
||||||
git fetch --tags sekai
|
version=$(gh api --paginate "repos/${REPO}/tags?per_page=100" --jq '.[].name' \
|
||||||
version=$(CGO_ENABLED=0 go run ./cmd/internal/read_tag)
|
| sort -V \
|
||||||
[ -z "$version" ] && version=${{ inputs.tag2 }}
|
| tail -n 1) || true
|
||||||
version=$(echo ${version%-*})
|
elif [ "$REPO" = 'reF1nd/sing-box' ]; then
|
||||||
|
version=$(gh api --paginate "repos/${REPO}/tags?per_page=100" --jq '.[].name' \
|
||||||
|
| grep -F 'reF1nd' \
|
||||||
|
| sort -V \
|
||||||
|
| tail -n 1) || true
|
||||||
|
else
|
||||||
|
version=''
|
||||||
|
fi
|
||||||
|
if [ -z "$version" ]; then
|
||||||
|
version='${{ inputs.tag2 }}'
|
||||||
|
fi
|
||||||
echo version=$version >> $GITHUB_OUTPUT
|
echo version=$version >> $GITHUB_OUTPUT
|
||||||
if [ -z "$TAGS" ];then
|
if [ -z "$TAGS" ];then
|
||||||
if [ "$REPO" = 'SagerNet/sing-box' ];then
|
if [ "$REPO" = 'SagerNet/sing-box' ];then
|
||||||
|
|||||||
Reference in New Issue
Block a user