File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -159,7 +159,7 @@ jobs:
159159 uses : actions/checkout@v3
160160 with :
161161 repository : XTLS/Xray-core
162- ref : main
162+ ref : v25.3.6
163163 path : xray-core
164164
165165 - name : Show workflow information
@@ -171,7 +171,7 @@ jobs:
171171 - name : Set up Go
172172 uses : actions/setup-go@v5
173173 with :
174- go-version : ' 1.21 '
174+ go-version-file : go.mod
175175 check-latest : true
176176
177177 - name : Get project dependencies
@@ -183,8 +183,14 @@ jobs:
183183 run : |
184184 cd xray-core
185185 mkdir -p build_assets
186- make
187- find . -maxdepth 1 -type f -regex '.*\(wxray\|xray\|xray_softfloat\)\(\|.exe\)' -exec mv {} ./build_assets/ \;
186+ COMMID=$(git describe --always --dirty)
187+ if [[ ${GOOS} == 'windows' ]]; then
188+ echo 'Building Xray for Windows...'
189+ 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
190+ else
191+ echo 'Building Xray...'
192+ go build -o build_assets/xray -trimpath -buildvcs=false -ldflags="-X github.com/xtls/xray-core/core.build=${COMMID} -s -w -buildid=" -v ./main
193+ fi
188194
189195 - name : Restore Cache
190196 uses : actions/cache/restore@v3
You can’t perform that action at this time.
0 commit comments