修复singboxp编译问题

This commit is contained in:
juewuy 2024-02-07 08:00:53 +08:00
parent 94a90e78b6
commit 52370ff11f

View File

@ -118,6 +118,7 @@ jobs:
GOARM: ${{ matrix.goarm }} GOARM: ${{ matrix.goarm }}
GOMIPS: ${{ matrix.gomips }} GOMIPS: ${{ matrix.gomips }}
CGO_ENABLED: 0 CGO_ENABLED: 0
REPO: ${{ github.event.inputs.tag1 }}
TAGS: ${{needs.sing-box.outputs.tags}} TAGS: ${{needs.sing-box.outputs.tags}}
VERSION: ${{needs.sing-box.outputs.version}} VERSION: ${{needs.sing-box.outputs.version}}
steps: steps:
@ -133,6 +134,18 @@ jobs:
with: with:
go-version: ${{ steps.go.outputs.version }} go-version: ${{ steps.go.outputs.version }}
- name: checkout sing repository
if: ${{ env.REPO == 'PuerNya/sing-box' }}
uses: actions/checkout@v4.1.1
with:
ref: fix-interface
path: sing
repository: PuerNya/sing
- name: replace sing
if: ${{ env.REPO == 'PuerNya/sing-box' }}
run: sed -i 's/^\/\/replace github.com.*$/replace github.com\/sagernet\/sing => .\/sing/' go.mod
- name: build core - name: build core
id: build id: build
run: go build -v -trimpath -ldflags "-X 'github.com/sagernet/sing-box/constant.Version=${VERSION}' -s -w -buildid=" -tags "${TAGS}" ./cmd/sing-box run: go build -v -trimpath -ldflags "-X 'github.com/sagernet/sing-box/constant.Version=${VERSION}' -s -w -buildid=" -tags "${TAGS}" ./cmd/sing-box