mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-10-27 10:30:08 +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:
|
on:
|
||||||
push:
|
push:
|
||||||
|
|
@ -10,7 +10,7 @@ jobs:
|
||||||
build:
|
build:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
platform: [amd64, arm64, armv7]
|
platform: [amd64, arm64]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
|
|
@ -21,33 +21,12 @@ jobs:
|
||||||
with:
|
with:
|
||||||
go-version: '1.21'
|
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
|
- name: Install dependencies for arm64
|
||||||
if: matrix.platform == 'arm64'
|
if: matrix.platform == 'arm64'
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt install gcc-aarch64-linux-gnu
|
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
|
- name: Get dependencies
|
||||||
run: |
|
run: |
|
||||||
go get github.com/shirou/gopsutil/v3/cpu
|
go get github.com/shirou/gopsutil/v3/cpu
|
||||||
|
|
@ -59,15 +38,19 @@ jobs:
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
|
export CGO_ENABLED=1
|
||||||
export GOOS=linux
|
export GOOS=linux
|
||||||
if [ "${{ matrix.platform }}" == "amd64" ]; then
|
export GOARCH=${{ matrix.platform }}
|
||||||
go build -o x-ui/xui-release -v main.go
|
if [ "${{ matrix.platform }}" == "arm64" ]; then
|
||||||
elif [ "${{ matrix.platform }}" == "arm64" ]; then
|
export CC=aarch64-linux-gnu-gcc
|
||||||
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
|
|
||||||
fi
|
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
|
mkdir x-ui/bin
|
||||||
cd 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
|
wget https://github.com/XTLS/Xray-core/releases/download/v1.8.4/Xray-linux-64.zip
|
||||||
unzip Xray-linux-64.zip
|
unzip Xray-linux-64.zip
|
||||||
rm -f 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
|
wget https://github.com/XTLS/Xray-core/releases/download/v1.8.4/Xray-linux-arm64-v8a.zip
|
||||||
unzip Xray-linux-arm64-v8a.zip
|
unzip Xray-linux-arm64-v8a.zip
|
||||||
rm -f 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
|
fi
|
||||||
rm -f geoip.dat geosite.dat iran.dat
|
rm -f geoip.dat geosite.dat iran.dat
|
||||||
wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat
|
wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue