3x-ui/.github/workflows/release.yml

44 lines
1.4 KiB
YAML
Raw Normal View History

2023-02-09 22:18:06 +03:00
name: Release 3X-ui
on:
workflow_dispatch:
jobs:
2023-02-15 22:01:32 +03:00
linuxamd64build:
2023-02-09 22:18:06 +03:00
name: build x-ui amd64 version
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3.5.0
2023-02-09 22:18:06 +03:00
- name: Set up Go
uses: actions/setup-go@v4.0.0
2023-02-09 22:18:06 +03:00
with:
2023-03-09 22:15:18 +03:00
go-version: 'stable'
2023-02-09 22:18:06 +03:00
- name: build linux amd64 version
run: |
CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -o xui-release -v main.go
mkdir x-ui
cp xui-release x-ui/xui-release
cp x-ui.service x-ui/x-ui.service
cp x-ui.sh x-ui/x-ui.sh
cd x-ui
mv xui-release x-ui
mkdir bin
cd bin
2023-02-28 22:54:29 +03:00
wget https://github.com/mhsanaei/Xray-core/releases/latest/download/Xray-linux-64.zip
2023-02-09 22:18:06 +03:00
unzip Xray-linux-64.zip
rm -f Xray-linux-64.zip geoip.dat geosite.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/geosite.dat
mv xray xray-linux-amd64
cd ..
cd ..
- name: package
run: tar -zcvf x-ui-linux-amd64.tar.gz x-ui
- name: upload
2023-02-23 00:08:50 +03:00
uses: svenstaro/upload-release-action@2.5.0
2023-02-09 22:18:06 +03:00
with:
2023-02-15 22:01:32 +03:00
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
file: x-ui-linux-amd64.tar.gz
2023-02-09 22:18:06 +03:00
asset_name: x-ui-linux-amd64.tar.gz
2023-02-16 18:58:20 +03:00
prerelease: true
2023-02-28 22:54:29 +03:00
overwrite: true