mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-08-31 15:26:18 +00:00
Update release.yml
This commit is contained in:
parent
87db0e4305
commit
4eb465fccb
1 changed files with 13 additions and 34 deletions
47
.github/workflows/release.yml
vendored
47
.github/workflows/release.yml
vendored
|
@ -1,4 +1,4 @@
|
|||
name: Release
|
||||
name: Release X-UI
|
||||
|
||||
on:
|
||||
push:
|
||||
|
@ -10,7 +10,7 @@ jobs:
|
|||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
platform: [amd64, arm64, armv7]
|
||||
platform: [amd64, arm64]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
|
@ -21,33 +21,12 @@ jobs:
|
|||
with:
|
||||
go-version: '1.21'
|
||||
|
||||
- name: Install dependencies for armv7
|
||||
if: matrix.platform == 'armv7'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt install gcc-arm-linux-gnueabihf
|
||||
|
||||
- name: Install dependencies for arm64
|
||||
if: matrix.platform == 'arm64'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt install gcc-aarch64-linux-gnu
|
||||
|
||||
- name: Set up environment for armv7
|
||||
if: matrix.platform == 'armv7'
|
||||
run: |
|
||||
export CGO_ENABLED=1
|
||||
export GOARCH=arm
|
||||
export GOARM=7
|
||||
export CC=arm-linux-gnueabihf-gcc
|
||||
|
||||
- name: Set up environment for arm64
|
||||
if: matrix.platform == 'arm64'
|
||||
run: |
|
||||
export CGO_ENABLED=1
|
||||
export GOARCH=arm64
|
||||
export CC=aarch64-linux-gnu-gcc
|
||||
|
||||
- name: Get dependencies
|
||||
run: |
|
||||
go get github.com/shirou/gopsutil/v3/cpu
|
||||
|
@ -59,15 +38,19 @@ jobs:
|
|||
|
||||
- name: Build
|
||||
run: |
|
||||
export CGO_ENABLED=1
|
||||
export GOOS=linux
|
||||
if [ "${{ matrix.platform }}" == "amd64" ]; then
|
||||
go build -o x-ui/xui-release -v main.go
|
||||
elif [ "${{ matrix.platform }}" == "arm64" ]; then
|
||||
go build -o x-ui/xui-release-arm64 -v main.go
|
||||
elif [ "${{ matrix.platform }}" == "armv7" ]; then
|
||||
go build -o x-ui/xui-release-armv7 -v main.go
|
||||
export GOARCH=${{ matrix.platform }}
|
||||
if [ "${{ matrix.platform }}" == "arm64" ]; then
|
||||
export CC=aarch64-linux-gnu-gcc
|
||||
fi
|
||||
go build -o xui-release -v main.go
|
||||
|
||||
mkdir x-ui
|
||||
cp xui-release x-ui/
|
||||
cp x-ui.service x-ui/
|
||||
cp x-ui.sh x-ui/
|
||||
mv x-ui/xui-release x-ui/x-ui
|
||||
mkdir x-ui/bin
|
||||
cd x-ui/bin
|
||||
|
||||
|
@ -76,14 +59,10 @@ jobs:
|
|||
wget https://github.com/XTLS/Xray-core/releases/download/v1.8.4/Xray-linux-64.zip
|
||||
unzip Xray-linux-64.zip
|
||||
rm -f Xray-linux-64.zip
|
||||
elif [ "${{ matrix.platform }}" == "arm64" ]; then
|
||||
else
|
||||
wget https://github.com/XTLS/Xray-core/releases/download/v1.8.4/Xray-linux-arm64-v8a.zip
|
||||
unzip Xray-linux-arm64-v8a.zip
|
||||
rm -f Xray-linux-arm64-v8a.zip
|
||||
elif [ "${{ matrix.platform }}" == "armv7" ]; then
|
||||
wget https://github.com/XTLS/Xray-core/releases/download/v1.8.4/Xray-linux-arm32-v7a.zip
|
||||
unzip Xray-linux-arm32-v7a.zip
|
||||
rm -f Xray-linux-arm32-v7a.zip
|
||||
fi
|
||||
rm -f geoip.dat geosite.dat iran.dat
|
||||
wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat
|
||||
|
|
Loading…
Reference in a new issue