release.yml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. name: Release 3X-ui
  2. on:
  3. workflow_dispatch:
  4. jobs:
  5. linuxamd64build:
  6. name: build x-ui amd64 version
  7. runs-on: ubuntu-20.04
  8. steps:
  9. - uses: actions/[email protected]
  10. - name: Set up Go
  11. uses: actions/[email protected]
  12. with:
  13. go-version: 'stable'
  14. - name: build linux amd64 version
  15. run: |
  16. CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -o xui-release -v main.go
  17. mkdir x-ui
  18. cp xui-release x-ui/xui-release
  19. cp x-ui.service x-ui/x-ui.service
  20. cp x-ui.sh x-ui/x-ui.sh
  21. cd x-ui
  22. mv xui-release x-ui
  23. mkdir bin
  24. cd bin
  25. wget https://github.com/mhsanaei/Xray-core/releases/latest/download/Xray-linux-64.zip
  26. unzip Xray-linux-64.zip
  27. rm -f Xray-linux-64.zip geoip.dat geosite.dat
  28. wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat
  29. wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat
  30. mv xray xray-linux-amd64
  31. cd ..
  32. cd ..
  33. - name: package
  34. run: tar -zcvf x-ui-linux-amd64.tar.gz x-ui
  35. - name: upload
  36. uses: svenstaro/[email protected]
  37. with:
  38. repo_token: ${{ secrets.GITHUB_TOKEN }}
  39. tag: ${{ github.ref }}
  40. file: x-ui-linux-amd64.tar.gz
  41. asset_name: x-ui-linux-amd64.tar.gz
  42. prerelease: true
  43. overwrite: true