From 5312d530d396e2dbcc35c4ebc6f99e475aab01ab Mon Sep 17 00:00:00 2001 From: Alphax-Hue3682 <191818854+Alphax-Hue3682@users.noreply.github.com> Date: Thu, 13 Feb 2025 18:56:29 +0330 Subject: [PATCH] Update release.yml --- .github/workflows/release.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f6c187317830..571fef376961 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -106,24 +106,23 @@ jobs: GOARCH: ${{ matrix.goarch }} GOARM: ${{ matrix.goarm }} CGO_ENABLED: 0 - PREFIX: /usr/local steps: - name: Checkout codebase uses: actions/checkout@v4 - + - name: Show workflow information run: | _NAME=${{ matrix.patch-assetname }} [ -n "$_NAME" ] || _NAME=$(jq ".[\"$GOOS-$GOARCH$GOARM$GOMIPS\"].friendlyName" -r < .github/build/friendly-filenames.json) echo "GOOS: $GOOS, GOARCH: $GOARCH, GOARM: $GOARM, GOMIPS: $GOMIPS, RELEASE_NAME: $_NAME" echo "ASSET_NAME=$_NAME" >> $GITHUB_ENV - + - name: Set up Go uses: actions/setup-go@v5 with: go-version-file: go.mod check-latest: true - + - name: Get project dependencies run: | go mod download @@ -134,13 +133,13 @@ jobs: mkdir -p build_assets make find . -maxdepth 1 -type f -regex './\(wxray\|xray\|xray_softfloat\)\(\|.exe\)' -exec mv {} ./build_assets/ \; - + - name: Restore Geodat Cache uses: actions/cache/restore@v4 with: path: resources key: xray-geodat- - + - name: Copy README.md & LICENSE run: | mv -f resources/* build_assets @@ -149,7 +148,7 @@ jobs: if [ "$GOOS" = "windows" ]; then cp ${GITHUB_WORKSPACE}/xray_no_window.vbs ./build_assets/xray_no_window.vbs || echo "xray_no_window.vbs not found, skipping." fi - + - name: Create ZIP archive if: github.event_name == 'release' shell: bash @@ -164,18 +163,18 @@ jobs: do openssl dgst -$METHOD $FILE | sed 's/([^)]*)//g' >>$DGST done - + - name: Change the name run: | mv build_assets Xray-${{ env.ASSET_NAME }} - + - name: Upload files to Artifacts uses: actions/upload-artifact@v4 with: name: Xray-${{ env.ASSET_NAME }} path: | ./Xray-${{ env.ASSET_NAME }}/* - + - name: Upload binaries to release uses: svenstaro/upload-release-action@v2 if: github.event_name == 'release'