From ad7361549a46487762a873e8987509078eb46dfb Mon Sep 17 00:00:00 2001 From: Kuzz007 Date: Sat, 25 Jul 2026 17:01:18 +0300 Subject: [PATCH] ci: drop the Windows build from release.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AmneziaWG (awg-quick, the DKMS kernel module) and this whole panel's real deployment target here are Linux servers/routers — the Windows job (MSYS2 + CGO cross-build, its own Xray/mtg-multi asset download step) never served a purpose for this fork and just spent CI minutes producing a binary nobody uses. Removed build-windows entirely and dropped it from publish-dev's needs. Also updated both READMEs' Supported Platforms line to match — this fork's CI no longer produces a Windows binary, upstream's still does. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/release.yml | 133 +--------------------------------- README.md | 2 +- README.ru_RU.md | 2 +- 3 files changed, 3 insertions(+), 134 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 604697eb5..cadf16784 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -202,137 +202,6 @@ jobs: overwrite: true prerelease: true - # ================================= - # Windows Build - # ================================= - build-windows: - name: Build for Windows - permissions: - contents: write - strategy: - matrix: - platform: - - amd64 - runs-on: windows-latest - steps: - - name: Checkout repository - uses: actions/checkout@v7 - - - name: Setup Go - uses: actions/setup-go@v7 - with: - go-version-file: go.mod - check-latest: true - - # Frontend dist must be built BEFORE go build — see comment on the - # Linux job above. This step is identical except npm runs on the - # Windows runner here. - - name: Setup Node.js - uses: actions/setup-node@v7 - with: - node-version-file: .nvmrc - cache: 'npm' - cache-dependency-path: frontend/package-lock.json - - - name: Build frontend bundle - shell: pwsh - run: | - npm ci - npm run build - working-directory: frontend - - - name: Install MSYS2 - uses: msys2/setup-msys2@v2 - with: - msystem: MINGW64 - update: true - install: >- - mingw-w64-x86_64-gcc - mingw-w64-x86_64-sqlite3 - mingw-w64-x86_64-pkg-config - - - name: Build 3X-UI for Windows (CGO) - shell: msys2 {0} - run: | - export PATH="/c/hostedtoolcache/windows/go/$(ls /c/hostedtoolcache/windows/go | sort -V | tail -n1)/x64/bin:$PATH" - - export CGO_ENABLED=1 - export GOOS=windows - export GOARCH=amd64 - export CC=x86_64-w64-mingw32-gcc - - which go - go version - gcc --version - - # Stamp the commit into per-commit (dev channel) builds only. - LDFLAGS="-w -s" - if [[ "$GITHUB_REF" != refs/tags/* ]]; then - LDFLAGS="$LDFLAGS -X github.com/mhsanaei/3x-ui/v3/internal/config.buildCommit=${GITHUB_SHA:0:8} -X github.com/mhsanaei/3x-ui/v3/internal/config.buildDate=$(date -u +%Y-%m-%dT%H:%M:%SZ)" - fi - go build -ldflags "$LDFLAGS" -o xui-release.exe -v main.go - - - name: Copy and download resources - shell: pwsh - run: | - $retry = @{ MaximumRetryCount = 5; RetryIntervalSec = 10 } - mkdir x-ui - Copy-Item xui-release.exe x-ui\x-ui.exe - mkdir x-ui\bin - cd x-ui\bin - - # Download Xray for Windows - $Xray_URL = "https://github.com/XTLS/Xray-core/releases/download/v26.7.11/" - Invoke-WebRequest @retry -Uri "${Xray_URL}Xray-windows-64.zip" -OutFile "Xray-windows-64.zip" - Expand-Archive -Path "Xray-windows-64.zip" -DestinationPath . - Remove-Item "Xray-windows-64.zip" - Remove-Item geoip.dat, geosite.dat -ErrorAction SilentlyContinue - Invoke-WebRequest @retry -Uri "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat" -OutFile "geoip.dat" - Invoke-WebRequest @retry -Uri "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat" -OutFile "geosite.dat" - Invoke-WebRequest @retry -Uri "https://github.com/chocolate4u/Iran-v2ray-rules/releases/latest/download/geoip.dat" -OutFile "geoip_IR.dat" - Invoke-WebRequest @retry -Uri "https://github.com/chocolate4u/Iran-v2ray-rules/releases/latest/download/geosite.dat" -OutFile "geosite_IR.dat" - Invoke-WebRequest @retry -Uri "https://github.com/runetfreedom/russia-v2ray-rules-dat/releases/latest/download/geoip.dat" -OutFile "geoip_RU.dat" - Invoke-WebRequest @retry -Uri "https://github.com/runetfreedom/russia-v2ray-rules-dat/releases/latest/download/geosite.dat" -OutFile "geosite_RU.dat" - Rename-Item xray.exe xray-windows-amd64.exe - - # mtg-multi (MTProto sidecar) publishes a prebuilt Windows binary, so - # download and unpack it instead of compiling. The tag comes from the - # release-page redirect on github.com — not api.github.com, whose - # outages have failed release runs while asset downloads kept working. - $MTG_MULTI_VER = (curl.exe -sf --retry 5 --retry-all-errors --retry-delay 3 -o NUL -w '%{redirect_url}' "https://github.com/mhsanaei/mtg-multi/releases/latest") -replace '^.*/releases/tag/', '' - if (-not $MTG_MULTI_VER -or $MTG_MULTI_VER -notmatch '^v[\d.]+$') { throw "could not resolve the latest mtg-multi release tag" } - $MTG_PKG = "mtg-multi-$($MTG_MULTI_VER.TrimStart('v'))-windows-amd64" - curl.exe -sfLRO --retry 5 --retry-all-errors --retry-delay 3 "https://github.com/mhsanaei/mtg-multi/releases/download/$MTG_MULTI_VER/$MTG_PKG.zip" - Expand-Archive -Path "$MTG_PKG.zip" -DestinationPath "mtg-tmp" -Force - Move-Item "mtg-tmp/$MTG_PKG/mtg-multi.exe" "mtg-windows-amd64.exe" - Remove-Item -Recurse -Force "mtg-tmp", "$MTG_PKG.zip" - - cd .. - Copy-Item -Path ..\windows_files\* -Destination . -Recurse - cd .. - - - name: Package to Zip - shell: pwsh - run: | - Compress-Archive -Path .\x-ui -DestinationPath "x-ui-windows-amd64.zip" - - - name: Upload files to Artifacts - uses: actions/upload-artifact@v7 - with: - name: x-ui-windows-amd64 - path: ./x-ui-windows-amd64.zip - - - name: Upload files to GH release - uses: svenstaro/upload-release-action@v2 - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - tag: ${{ github.ref_name }} - file: x-ui-windows-amd64.zip - asset_name: x-ui-windows-amd64.zip - overwrite: true - prerelease: true - # ================================= # Rolling dev channel (per-commit) # ================================= @@ -343,7 +212,7 @@ jobs: # channel is unaffected. publish-dev: name: Publish rolling dev release - needs: [build, build-windows] + needs: [build] if: github.event_name == 'push' && github.ref == 'refs/heads/main' runs-on: ubuntu-latest permissions: diff --git a/README.md b/README.md index a107a5f3c..6c0a38a3c 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ zero prompts, generating random credentials and writing them to ## Supported Platforms -**Operating systems:** Ubuntu, Debian, Armbian, Fedora, CentOS, RHEL, AlmaLinux, Rocky Linux, Oracle Linux, Amazon Linux, Virtuozzo, Arch, Manjaro, Parch, openSUSE (Tumbleweed / Leap), Alpine, and Windows. +**Operating systems:** Ubuntu, Debian, Armbian, Fedora, CentOS, RHEL, AlmaLinux, Rocky Linux, Oracle Linux, Amazon Linux, Virtuozzo, Arch, Manjaro, Parch, openSUSE (Tumbleweed / Leap), and Alpine. (Upstream also publishes a Windows build; this fork's CI doesn't — everything here targets Linux servers/routers, and AmneziaWG needs a Linux kernel module regardless.) **Architectures:** `amd64` · `386` · `arm64` (aarch64) · `armv7` · `armv6` · `armv5` · `s390x`. diff --git a/README.ru_RU.md b/README.ru_RU.md index b8501e4bd..e4b770a33 100644 --- a/README.ru_RU.md +++ b/README.ru_RU.md @@ -99,7 +99,7 @@ curl -fsSL https://raw.githubusercontent.com/Kuzz007/3x-ui/main/install.sh | bas ## Поддерживаемые платформы -**Операционные системы:** Ubuntu, Debian, Armbian, Fedora, CentOS, RHEL, AlmaLinux, Rocky Linux, Oracle Linux, Amazon Linux, Virtuozzo, Arch, Manjaro, Parch, openSUSE (Tumbleweed / Leap), Alpine и Windows. +**Операционные системы:** Ubuntu, Debian, Armbian, Fedora, CentOS, RHEL, AlmaLinux, Rocky Linux, Oracle Linux, Amazon Linux, Virtuozzo, Arch, Manjaro, Parch, openSUSE (Tumbleweed / Leap) и Alpine. (В апстриме также есть сборка под Windows; в CI этого форка её нет — здесь всё нацелено на Linux-серверы/роутеры, да и AmneziaWG в любом случае требует модуль ядра Linux.) **Архитектуры:** `amd64` · `386` · `arm64` (aarch64) · `armv7` · `armv6` · `armv5` · `s390x`.