@@ -37,15 +37,15 @@ jobs:
3737 echo "version=${{ inputs.version }}" >> "$GITHUB_ENV"
3838
3939 - name : Check input version
40- if : ${{ inputs.tag-name }} != "draft"
40+ if : github.event_name != 'workflow_dispatch' && " ${{ inputs.tag-name }}" != "draft"
4141 run : |-
4242 echo "version=${{ inputs.tag-name }}"
4343 echo "version=${{ inputs.tag-name }}" >> "$GITHUB_ENV"
4444
4545 - name : Calculate version
46- if : github.event_name != 'workflow_dispatch' && ${{ inputs.version }} == "draft"
46+ if : github.event_name != 'workflow_dispatch' && " ${{ inputs.tag-name }}" == "draft"
4747 run : |-
48- echo "version=$$ (git describe --tags)" >> "$GITHUB_ENV"
48+ echo "version=$(git describe --tags)" >> "$GITHUB_ENV"
4949 - name : Set outputs
5050 id : outputs
5151 run : |-
@@ -197,6 +197,8 @@ jobs:
197197 runs-on : ubuntu-latest
198198 needs :
199199 - calculate_version
200+
201+
200202 strategy :
201203 fail-fast : false
202204 matrix :
@@ -281,7 +283,7 @@ jobs:
281283 if : matrix.naive
282284 run : |
283285 set -xeuo pipefail
284- CRONET_GO_VERSION=$(cat .github/CRONET_GO_VERSION)
286+ CRONET_GO_VERSION=$(cat hiddify-sing-box/ .github/CRONET_GO_VERSION)
285287 git init ~/cronet-go
286288 git -C ~/cronet-go remote add origin https://github.com/sagernet/cronet-go.git
287289 git -C ~/cronet-go fetch --depth=1 origin "$CRONET_GO_VERSION"
@@ -295,7 +297,7 @@ jobs:
295297 path : |
296298 ~/cronet-go/naiveproxy/src/third_party/llvm-build/Release+Asserts
297299 ~/cronet-go/naiveproxy/src/out/sysroot-build
298- key : chromium-toolchain-${{ matrix.arch }}-${{ matrix.variant }}-${{ hashFiles('.github/CRONET_GO_VERSION') }}
300+ key : chromium-toolchain-${{ matrix.arch }}-${{ matrix.variant }}-${{ hashFiles('hiddify-sing-box/ .github/CRONET_GO_VERSION') }}
299301 - name : Download Chromium toolchain
300302 if : matrix.naive
301303 run : |
@@ -339,7 +341,7 @@ jobs:
339341 set -xeuo pipefail
340342 mkdir -p dist
341343 go build -v -trimpath -o dist/hiddify-core -tags "${BUILD_TAGS}" \
342- -ldflags '-s -buildid= -X github.com/sagernet/sing-box/constant .Version= ${{ needs.calculate_version.outputs.version }} -X internal/godebug.defaultGODEBUG=multipathtcp=0 -checklinkname=0' \
344+ -ldflags '-s -buildid= -X github.com/hiddify/hiddify-core/v2/hcommon/constants .Version${{ needs.calculate_version.outputs.version }} -X internal/godebug.defaultGODEBUG=multipathtcp=0 -checklinkname=0' \
343345 ./cmd/
344346 env :
345347 CGO_ENABLED : " 0"
@@ -361,7 +363,7 @@ jobs:
361363 set -xeuo pipefail
362364 mkdir -p dist
363365 go build -v -trimpath -o dist/hiddify-core -tags "${BUILD_TAGS}" \
364- -ldflags '-s -buildid= -X github.com/sagernet/sing-box/constant .Version= ${{ needs.calculate_version.outputs.version }} -X internal/godebug.defaultGODEBUG=multipathtcp=0 -checklinkname=0' \
366+ -ldflags '-s -buildid= -X github.com/hiddify/hiddify-core/v2/hcommon/constants .Version${{ needs.calculate_version.outputs.version }} -X internal/godebug.defaultGODEBUG=multipathtcp=0 -checklinkname=0' \
365367 ./cmd/
366368 env :
367369 CGO_ENABLED : " 1"
@@ -376,7 +378,7 @@ jobs:
376378 set -xeuo pipefail
377379 mkdir -p dist
378380 go build -v -trimpath -o dist/hiddify-core -tags "${BUILD_TAGS}" \
379- -ldflags '-s -buildid= -X github.com/sagernet/sing-box/constant .Version= ${{ needs.calculate_version.outputs.version }} -X internal/godebug.defaultGODEBUG=multipathtcp=0 -checklinkname=0' \
381+ -ldflags '-s -buildid= -X github.com/hiddify/hiddify-core/v2/hcommon/constants .Version${{ needs.calculate_version.outputs.version }} -X internal/godebug.defaultGODEBUG=multipathtcp=0 -checklinkname=0' \
380382 ./cmd/
381383 env :
382384 CGO_ENABLED : " 1"
@@ -391,7 +393,7 @@ jobs:
391393 set -xeuo pipefail
392394 mkdir -p dist
393395 go build -v -trimpath -o dist/hiddify-core -tags "${BUILD_TAGS}" \
394- -ldflags '-s -buildid= -X github.com/sagernet/sing-box/constant .Version= ${{ needs.calculate_version.outputs.version }} -X internal/godebug.defaultGODEBUG=multipathtcp=0 -checklinkname=0' \
396+ -ldflags '-s -buildid= -X github.com/hiddify/hiddify-core/v2/hcommon/constants .Version${{ needs.calculate_version.outputs.version }} -X internal/godebug.defaultGODEBUG=multipathtcp=0 -checklinkname=0' \
395397 ./cmd/
396398 env :
397399 CGO_ENABLED : " 0"
@@ -411,7 +413,7 @@ jobs:
411413 export CXX="${CC}++"
412414 mkdir -p dist
413415 GOOS=$BUILD_GOOS GOARCH=$BUILD_GOARCH build go build -v -trimpath -o dist/hiddify-core -tags "${BUILD_TAGS}" \
414- -ldflags '-s -buildid= -X github.com/sagernet/sing-box/constant .Version= ${{ needs.calculate_version.outputs.version }} -X internal/godebug.defaultGODEBUG=multipathtcp=0 -checklinkname=0' \
416+ -ldflags '-s -buildid= -X github.com/hiddify/hiddify-core/v2/hcommon/constants .Version${{ needs.calculate_version.outputs.version }} -X internal/godebug.defaultGODEBUG=multipathtcp=0 -checklinkname=0' \
415417 ./cmd/
416418 env :
417419 CGO_ENABLED : " 1"
0 commit comments