Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[add] Added automatic release builder.
- Loading branch information
Showing
4 changed files
with
169 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
||
|
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.