mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-12-25 15:09:50 +00:00
Patch commit SHA and some tweaks
This commit is contained in:
parent
97fc185fcb
commit
390fbb60ef
26
.github/workflows/release-win7.yml
vendored
26
.github/workflows/release-win7.yml
vendored
@ -41,9 +41,10 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd ./src
|
cd ./src
|
||||||
. ./all.bash
|
. ./all.bash
|
||||||
cd ../
|
cd ${{ github.workspace }}
|
||||||
mkdir -p patched-go
|
mkdir -p patched-go
|
||||||
rsync -a --exclude 'patched-go' ./ 'patched-go'
|
rsync -a --exclude 'patched-go' ./ 'patched-go'
|
||||||
|
|
||||||
- name: Save patched builder
|
- name: Save patched builder
|
||||||
uses: actions/cache/save@v4
|
uses: actions/cache/save@v4
|
||||||
with:
|
with:
|
||||||
@ -82,6 +83,7 @@ jobs:
|
|||||||
echo "unhit=true" >> $GITHUB_OUTPUT
|
echo "unhit=true" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
- name: Save Cache
|
- name: Save Cache
|
||||||
uses: actions/cache/save@v4
|
uses: actions/cache/save@v4
|
||||||
if: ${{ steps.update.outputs.unhit }}
|
if: ${{ steps.update.outputs.unhit }}
|
||||||
@ -117,6 +119,7 @@ jobs:
|
|||||||
_NAME=${{ matrix.assetname }}
|
_NAME=${{ matrix.assetname }}
|
||||||
echo "GOOS: ${{ matrix.goos }}, GOARCH: ${{ matrix.goarch }}, RELEASE_NAME: $_NAME"
|
echo "GOOS: ${{ matrix.goos }}, GOARCH: ${{ matrix.goarch }}, RELEASE_NAME: $_NAME"
|
||||||
echo "ASSET_NAME=$_NAME" >> $GITHUB_ENV
|
echo "ASSET_NAME=$_NAME" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Checkout codebase
|
- name: Checkout codebase
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
@ -129,20 +132,21 @@ jobs:
|
|||||||
- name: Download dependencies and build Xray
|
- name: Download dependencies and build Xray
|
||||||
run: |
|
run: |
|
||||||
echo "Setup environment..."
|
echo "Setup environment..."
|
||||||
export PATH=$PATH:$PWD/patched-go/bin
|
export PATH=$PATH:${{ github.workspace }}/patched-go/bin
|
||||||
./patched-go/bin/go version
|
${{ github.workspace }}/patched-go/bin/go version
|
||||||
./patched-go/bin/go env -w GOPATH=$PWD
|
${{ github.workspace }}/patched-go/bin/go env -w GOPATH=${{ github.workspace }}
|
||||||
./patched-go/bin/go env -w GOROOT=$PWD/patched-go
|
${{ github.workspace }}/patched-go/bin/go env -w GOROOT=${{ github.workspace }}/patched-go
|
||||||
echo "Download dependencies..."
|
echo "Download dependencies..."
|
||||||
./patched-go/bin/go mod download
|
${{ github.workspace }}/patched-go/bin/go mod download
|
||||||
echo "Build Xray..."
|
echo "Build Xray..."
|
||||||
mkdir -p build_assets
|
mkdir -p build_assets
|
||||||
./patched-go/bin/go clean -v -i $PWD
|
${{ github.workspace }}/patched-go/bin/go clean -v -i $PWD
|
||||||
rm -f xray xray.exe wxray.exe xray_softfloat
|
rm -f xray xray.exe wxray.exe xray_softfloat
|
||||||
./patched-go/bin/go build -o xray.exe -trimpath -ldflags "-s -w -buildid=" -v ./main
|
${{ github.workspace }}/patched-go/bin/go build -o xray.exe -trimpath -ldflags "-X github.com/xtls/xray-core/core.build=win7-${{ github.ref_name }}-${{ github.sha }} -s -w -buildid=" -v ./main
|
||||||
./patched-go/bin/go build -o wxray.exe -trimpath -ldflags "-H windowsgui -s -w -buildid=" -v ./main
|
${{ github.workspace }}/patched-go/bin/go build -o wxray.exe -trimpath -ldflags "-H windowsgui -X github.com/xtls/xray-core/core.build=win7-${{ github.ref_name }}-${{ github.sha }} -s -w -buildid=" -v ./main
|
||||||
echo "Build completed."
|
echo "Build completed."
|
||||||
find . -maxdepth 1 -type f -regex './\(wxray\|xray\).exe' -exec mv {} ./build_assets/ \;
|
find . -maxdepth 1 -type f -regex './\(wxray\|xray\).exe' -exec mv {} ./build_assets/ \;
|
||||||
|
|
||||||
- name: Restore Cache
|
- name: Restore Cache
|
||||||
uses: actions/cache/restore@v4
|
uses: actions/cache/restore@v4
|
||||||
with:
|
with:
|
||||||
@ -154,6 +158,7 @@ jobs:
|
|||||||
mv -f resources/* build_assets
|
mv -f resources/* build_assets
|
||||||
cp ${GITHUB_WORKSPACE}/README.md ./build_assets/README.md
|
cp ${GITHUB_WORKSPACE}/README.md ./build_assets/README.md
|
||||||
cp ${GITHUB_WORKSPACE}/LICENSE ./build_assets/LICENSE
|
cp ${GITHUB_WORKSPACE}/LICENSE ./build_assets/LICENSE
|
||||||
|
|
||||||
- name: Create ZIP archive
|
- name: Create ZIP archive
|
||||||
if: github.event_name == 'release'
|
if: github.event_name == 'release'
|
||||||
shell: bash
|
shell: bash
|
||||||
@ -168,15 +173,18 @@ jobs:
|
|||||||
do
|
do
|
||||||
openssl dgst -$METHOD $FILE | sed 's/([^)]*)//g' >>$DGST
|
openssl dgst -$METHOD $FILE | sed 's/([^)]*)//g' >>$DGST
|
||||||
done
|
done
|
||||||
|
|
||||||
- name: Change the name
|
- name: Change the name
|
||||||
run: |
|
run: |
|
||||||
mv build_assets Xray-${{ env.ASSET_NAME }}
|
mv build_assets Xray-${{ env.ASSET_NAME }}
|
||||||
|
|
||||||
- name: Upload files to Artifacts
|
- name: Upload files to Artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Xray-${{ env.ASSET_NAME }}
|
name: Xray-${{ env.ASSET_NAME }}
|
||||||
path: |
|
path: |
|
||||||
./Xray-${{ env.ASSET_NAME }}/*
|
./Xray-${{ env.ASSET_NAME }}/*
|
||||||
|
|
||||||
- name: Upload binaries to release
|
- name: Upload binaries to release
|
||||||
uses: svenstaro/upload-release-action@v2
|
uses: svenstaro/upload-release-action@v2
|
||||||
if: github.event_name == 'release'
|
if: github.event_name == 'release'
|
||||||
|
Loading…
Reference in New Issue
Block a user