增加协议屏蔽支持

This commit is contained in:
qaq
2025-08-17 22:19:35 +08:00
parent 86988b48f9
commit 04a0ffdc50
2 changed files with 20 additions and 26 deletions
+20 -25
View File
@@ -71,32 +71,27 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
run: |
# 删除已存在的 release 和 tag
gh release delete gost-latest --yes 2>/dev/null || echo "No existing release to delete"
# 创建新的 release
gh release create gost-latest \
--title "GOST Binary Latest" \
--notes "GOST binary compiled from commit ${{ github.sha }}
- Platform: Linux AMD64
- Compressed with UPX
- Build date: ${{ github.event.head_commit.timestamp }}" \
--repo ${{ github.repository }}
# 确保 tag 指向当前 commit
git tag -f gost-latest ${{ github.sha }}
git push origin gost-latest --force
# 检查 release 是否存在,不存在则创建
if gh release view gost-latest 2>/dev/null; then
echo "Release exists, will update assets"
else
echo "Release not found, creating new release"
gh release create gost-latest gost-latest \
--title "GOST Binary Latest" \
--notes "GOST binary compiled from commit ${{ github.sha }}
- Platform: Linux AMD64
- Compressed with UPX
- Build date: ${{ github.event.head_commit.timestamp }}" \
--repo ${{ github.repository }}
fi
# 上传 asset 并覆盖同名文件
gh release upload gost-latest ./go-gost/gost --clobber
- name: Upload GOST binary to Release
if: steps.gost-changes.outputs.gost == 'true'
env:
GH_TOKEN: ${{ github.token }}
run: |
# 删除已存在的 asset(如果有)
gh api repos/${{ github.repository }}/releases/tags/gost-latest/assets --jq '.[] | select(.name=="gost") | .id' | xargs -I {} gh api repos/${{ github.repository }}/releases/assets/{} -X DELETE 2>/dev/null || echo "No existing asset to delete"
# 上传新的 asset
gh api repos/${{ github.repository }}/releases/tags/gost-latest/assets \
-F name=gost \
-F "data=@./go-gost/gost" \
-H "Content-Type: application/octet-stream"
build-vite:
if: contains(github.event.head_commit.message, '[skip vite]') == false
-1
View File
@@ -147,5 +147,4 @@ func main() {
}
// GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o gost
//
// upx --best --lzma gost