|
@@ -173,36 +173,11 @@ jobs:
|
|
|
- name: Get project dependencies
|
|
|
run: go mod download
|
|
|
|
|
|
- - name: Replace Custom to Commit ID
|
|
|
- if: github.event_name != 'release'
|
|
|
- run: |
|
|
|
- ID=$(git rev-parse --short ${{ github.sha }})
|
|
|
- if [ "${{ github.event_name }}" == 'pull_request' ]
|
|
|
- then
|
|
|
- ID=$(git rev-parse --short ${{ github.event.pull_request.head.sha }})
|
|
|
- fi
|
|
|
- sed -i '/build/ s/Custom/'$ID'/' ./core/core.go
|
|
|
-
|
|
|
- name: Build Xray
|
|
|
run: |
|
|
|
mkdir -p build_assets
|
|
|
- go build -v -o build_assets/xray -trimpath -ldflags "-s -w -buildid=" ./main
|
|
|
-
|
|
|
- - name: Build background Xray on Windows
|
|
|
- if: matrix.goos == 'windows'
|
|
|
- run: |
|
|
|
- go build -v -o build_assets/wxray.exe -trimpath -ldflags "-s -w -H windowsgui -buildid=" ./main
|
|
|
-
|
|
|
- - name: Build Mips softfloat Xray
|
|
|
- if: matrix.goarch == 'mips' || matrix.goarch == 'mipsle'
|
|
|
- run: |
|
|
|
- GOMIPS=softfloat go build -v -o build_assets/xray_softfloat -trimpath -ldflags "-s -w -buildid=" ./main
|
|
|
-
|
|
|
- - name: Rename Windows Xray
|
|
|
- if: matrix.goos == 'windows'
|
|
|
- run: |
|
|
|
- cd ./build_assets || exit 1
|
|
|
- mv xray xray.exe
|
|
|
+ make
|
|
|
+ find . -maxdepth 1 -type f -regex '.*\(wxray\|xray\|xray_softfloat\)\(\|.exe\)' -exec mv {} ./build_assets/ \;
|
|
|
|
|
|
- name: Restore Cache
|
|
|
uses: actions/cache/restore@v3
|