diff --git a/.github/workflows/build_xray.yml b/.github/workflows/build_xray.yml index 92591c5..23140be 100644 --- a/.github/workflows/build_xray.yml +++ b/.github/workflows/build_xray.yml @@ -159,7 +159,7 @@ jobs: uses: actions/checkout@v3 with: repository: XTLS/Xray-core - ref: main + ref: v25.3.6 path: xray-core - name: Show workflow information @@ -171,7 +171,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: '1.21' + go-version: 1.24 check-latest: true - name: Get project dependencies @@ -183,8 +183,14 @@ jobs: run: | cd xray-core mkdir -p build_assets - make - find . -maxdepth 1 -type f -regex '.*\(wxray\|xray\|xray_softfloat\)\(\|.exe\)' -exec mv {} ./build_assets/ \; + COMMID=$(git describe --always --dirty) + if [[ ${GOOS} == 'windows' ]]; then + echo 'Building Xray for Windows...' + go build -o build_assets/xray.exe -trimpath -buildvcs=false -ldflags="-X github.com/xtls/xray-core/core.build=${COMMID} -s -w -buildid=" -v ./main + else + echo 'Building Xray...' + go build -o build_assets/xray -trimpath -buildvcs=false -ldflags="-X github.com/xtls/xray-core/core.build=${COMMID} -s -w -buildid=" -v ./main + fi - name: Restore Cache uses: actions/cache/restore@v3