mirror of
https://github.com/Qv2ray/Qv2ray.git
synced 2025-05-21 03:10:24 +08:00
[add] Added automatic release builder.
This commit is contained in:
parent
568e8a744b
commit
2bc667ac3b
169
.github/workflows/build-release.yml
vendored
Normal file
169
.github/workflows/build-release.yml
vendored
Normal file
@ -0,0 +1,169 @@
|
||||
name: Build Artifact for Release
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [prereleased]
|
||||
|
||||
jobs:
|
||||
Windows:
|
||||
name: Release for Windows x64
|
||||
runs-on: windows-2019
|
||||
steps:
|
||||
- name: Checkout Sources
|
||||
uses: actions/checkout@master
|
||||
- name: Restore Git Submodules
|
||||
run: git submodule update --init
|
||||
# --------------------------------------------------------
|
||||
- name: Installing aqtinstall and Qt
|
||||
run: |
|
||||
pip3 install aqtinstall
|
||||
python -m aqt install 5.12.5 windows desktop win64_mingw73
|
||||
# --------------------------------------------------------
|
||||
- name: Build Qv2ray
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
set PATH=..\Qt5.12.5\5.12.5\mingw73_64\bin;..\Qt5.12.5\Tools\mingw73_64\bin;%PATH%
|
||||
qmake ..
|
||||
mingw32-make -j4
|
||||
- name: Make release package
|
||||
run: |
|
||||
cd build
|
||||
mkdir package
|
||||
cd package
|
||||
copy ..\release\Qv2ray.exe .\
|
||||
copy ..\..\libs\libcrypto-1_1.dll .\
|
||||
copy ..\..\libs\libssl-1_1.dll .\
|
||||
set PATH=..\..\Qt5.12.5\5.12.5\mingw73_64\bin;..\..\Qt5.12.5\Tools\mingw73_64\bin;%PATH%
|
||||
windeployqt ./Qv2ray.exe
|
||||
cd ..
|
||||
..\tools\7z.exe a Qv2ray.zip .\package\*
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: Qv2ray.windows.zip
|
||||
path: build/Qv2ray.zip
|
||||
- name: Upload binaries to release
|
||||
uses: svenstaro/upload-release-action@v1-release
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: build/Qv2ray.zip
|
||||
asset_name: Qv2ray-${{ github.ref }}-win64.zip
|
||||
tag: ${{ github.ref }}
|
||||
overwrite: true
|
||||
|
||||
# =========================================================================================
|
||||
|
||||
macOS:
|
||||
name: Release for macOS
|
||||
runs-on: macOS-10.14
|
||||
steps:
|
||||
- name: Checkout Sources
|
||||
uses: actions/checkout@master
|
||||
- name: Restore Git Submodules
|
||||
run: git submodule update --init
|
||||
# --------------------------------------------------------
|
||||
- name: Installing Node
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '10.x'
|
||||
|
||||
- name: "Preparing NPM"
|
||||
run: |
|
||||
cd .github/install-qt/
|
||||
npm ci
|
||||
npm run build
|
||||
|
||||
- name: Install Qt
|
||||
uses: ./.github/install-qt/
|
||||
# --------------------------------------------------------
|
||||
- name: Build Qv2ray
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
qmake ..
|
||||
make -j4
|
||||
- name: Make Package
|
||||
run: |
|
||||
cd build
|
||||
cd Qv2ray.app
|
||||
macdeployqt ./
|
||||
cd ..
|
||||
tar czf Qv2ray.app.tar.gz Qv2ray.app
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: Qv2ray.macOS.app.zip
|
||||
path: build/Qv2ray.app.tar.gz
|
||||
- name: Upload binaries to release
|
||||
uses: svenstaro/upload-release-action@v1-release
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: build/Qv2ray.app.tar.gz
|
||||
asset_name: Qv2ray-${{ github.ref }}-macOS.tar.gz
|
||||
tag: ${{ github.ref }}
|
||||
overwrite: true
|
||||
# ===================================================================================
|
||||
|
||||
Linux:
|
||||
name: Release for linux
|
||||
runs-on: ubuntu-16.04
|
||||
steps:
|
||||
- name: Checkout Sources
|
||||
uses: actions/checkout@master
|
||||
- name: Restore Git Submodules
|
||||
run: git submodule update --init
|
||||
# --------------------------------------------------------
|
||||
- name: Installing Node
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '10.x'
|
||||
|
||||
- name: "Preparing NPM"
|
||||
run: |
|
||||
cd .github/install-qt/
|
||||
npm ci
|
||||
npm run build
|
||||
|
||||
- name: Install Qt
|
||||
uses: ./.github/install-qt/
|
||||
# --------------------------------------------------------
|
||||
- name: Install libgl-dev and openssl libx11-dev libxkbcommon-x11-dev
|
||||
run: sudo apt install -y libgl-dev openssl libx11-dev libxkbcommon-x11-dev
|
||||
- name: Build Qv2ray
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
qmake ..
|
||||
make -j4
|
||||
- name: Generate FS Structure for AppImage
|
||||
run: |
|
||||
cd build
|
||||
make install INSTALL_ROOT=AppDir
|
||||
cd AppDir
|
||||
mkdir -p ./opt/Qv2ray/lib/
|
||||
cp /lib/x86_64-linux-gnu/libssl.so.1.0.0 /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 ./opt/Qv2ray/lib/
|
||||
- name: Build AppImage using linuxdeployqt
|
||||
run: |
|
||||
cd build/AppDir
|
||||
wget https://github.com/probonopd/linuxdeployqt/releases/download/6/linuxdeployqt-6-x86_64.AppImage
|
||||
mv ./linuxdeployqt-6-x86_64.AppImage ../
|
||||
chmod +x ../linuxdeployqt-6-x86_64.AppImage
|
||||
../linuxdeployqt-6-x86_64.AppImage --appimage-extract
|
||||
./squashfs-root/AppRun opt/Qv2ray/share/applications/Qv2ray.desktop -appimage -no-strip -always-overwrite
|
||||
mv ./Qv2ray*.AppImage ./Qv2ray.AppImage
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: Qv2ray.linux.AppImage
|
||||
path: build/AppDir/Qv2ray.AppImage
|
||||
- name: Upload binaries to release
|
||||
uses: svenstaro/upload-release-action@v1-release
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: build/AppDir/Qv2ray.AppImage
|
||||
asset_name: Qv2ray-${{ github.ref }}-linux.AppImage
|
||||
tag: ${{ github.ref }}
|
||||
overwrite: true
|
||||
|
||||
|
96
.github/workflows/build_release_artifact.yml
vendored
96
.github/workflows/build_release_artifact.yml
vendored
@ -1,96 +0,0 @@
|
||||
name: Prepare For GitHub Release
|
||||
|
||||
on:
|
||||
[push]
|
||||
|
||||
jobs:
|
||||
build_release_win64:
|
||||
name: Release for Windows x64
|
||||
runs-on: windows-2019
|
||||
steps:
|
||||
- name: Checkout Sources
|
||||
uses: actions/checkout@master
|
||||
with:
|
||||
ref: master
|
||||
- name: Restore Git Submodules
|
||||
run: git submodule update --init
|
||||
# --------------------------------------------------------
|
||||
- name: Installing aqtinstall
|
||||
run: pip3 install aqtinstall
|
||||
|
||||
- name: Install Qt
|
||||
run: python -m aqt install 5.12.5 windows desktop win64_mingw73
|
||||
# --------------------------------------------------------
|
||||
- name: Build Qv2ray
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
set PATH=..\Qt5.12.5\5.12.5\mingw73_64\bin;..\Qt5.12.5\Tools\mingw73_64\bin;%PATH%
|
||||
qmake ..
|
||||
mingw32-make -j4
|
||||
|
||||
build_release_linux:
|
||||
name: Release for linux
|
||||
runs-on: ubuntu-16.04
|
||||
steps:
|
||||
- name: Checkout Sources
|
||||
uses: actions/checkout@master
|
||||
with:
|
||||
ref: master
|
||||
- name: Restore Git Submodules
|
||||
run: git submodule update --init
|
||||
# --------------------------------------------------------
|
||||
- name: Installing Node
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '10.x'
|
||||
|
||||
- name: "Preparing NPM"
|
||||
run: |
|
||||
cd .github/install-qt/
|
||||
npm ci
|
||||
npm run build
|
||||
|
||||
- name: Install Qt
|
||||
uses: ./.github/install-qt/
|
||||
# --------------------------------------------------------
|
||||
- name: Install libgl-dev
|
||||
run: sudo apt install -y libgl-dev
|
||||
- name: Build Qv2ray
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
qmake ..
|
||||
make -j4
|
||||
|
||||
build_release_macOS:
|
||||
name: Release for macOS
|
||||
runs-on: macOS-10.14
|
||||
steps:
|
||||
- name: Checkout Sources
|
||||
uses: actions/checkout@master
|
||||
with:
|
||||
ref: master
|
||||
- name: Restore Git Submodules
|
||||
run: git submodule update --init
|
||||
# --------------------------------------------------------
|
||||
- name: Installing Node
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '10.x'
|
||||
|
||||
- name: "Preparing NPM"
|
||||
run: |
|
||||
cd .github/install-qt/
|
||||
npm ci
|
||||
npm run build
|
||||
|
||||
- name: Install Qt
|
||||
uses: ./.github/install-qt/
|
||||
# --------------------------------------------------------
|
||||
- name: Build Qv2ray
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
qmake ..
|
||||
make -j4
|
BIN
tools/7z.dll
Normal file
BIN
tools/7z.dll
Normal file
Binary file not shown.
BIN
tools/7z.exe
Normal file
BIN
tools/7z.exe
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user