-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cross-platform GitHub Action Deploy Test
- Loading branch information
1 parent
56bead5
commit 71be556
Showing
2 changed files
with
118 additions
and
50 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,118 @@ | ||
name: Build Ghost Downloader | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-windows: | ||
strategy: | ||
matrix: | ||
architecture: [x86_64, arm64] | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install --timeout=300 -r requirements.txt | ||
pip install nuitka | ||
- name: Build with Nuitka | ||
run: | | ||
mv main.py "Ghost Downloader.py" | ||
python -c "import sys; sys.path.append('./app/common'); import config; print(config.VERSION)" > version.txt | ||
$version = (Get-Content version.txt)[3] | ||
echo "VERSION=$version" >> "$GITHUB_ENV" | ||
echo "VERSION=$version" | ||
nuitka --standalone --enable-plugin=pyside6 --show-memory --output-dir=output --output-filename="Ghost Downloader.exe" --disable-console --windows-icon-from-ico=images/logo.ico --company-name=XiaoYouChR --product-name="Ghost Downloader" --file-description="Ghost Downloader" --copyright="Copyright(C) 2024 XiaoYouChR" --file-version=$version --product-version=$version "Ghost Downloader.py" | ||
nuitka --module plugins/jy_os_page.py | ||
mkdir -p "output/Ghost Downloader.dist/plugins/" | ||
mv jy_os_page*.pyd "output/Ghost Downloader.dist/plugins/" | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Ghost-Downloader-v${{ env.VERSION }}-Windows-${{ matrix.architecture }} | ||
path: output/Ghost Downloader.dist | ||
|
||
build-macos: | ||
strategy: | ||
matrix: | ||
architecture: [x86_64, arm64] | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install --timeout=300 -r requirements.txt | ||
pip install nuitka | ||
- name: Build with Nuitka | ||
run: | | ||
mv main.py "Ghost Downloader.py" | ||
python -c "import sys; sys.path.append('./app/common'); import config; print(config.VERSION)" > version.txt | ||
version=$(sed -n '4p' version.txt) | ||
echo "VERSION=$version" >> "$GITHUB_ENV" | ||
echo "VERSION=${{ env.VERSION }}" | ||
nuitka --standalone --enable-plugin=pyside6 --show-memory --output-dir=output --disable-console --macos-app-icon=images/logo.icns --macos-create-app-bundle --company-name=XiaoYouChR --macos-app-name="Ghost Downloader" --macos-app-version=$version --macos-signed-app-name=com.xiaoyouchr.ghostdownloader "Ghost Downloader.py" | ||
nuitka --module plugins/jy_os_page.py | ||
mkdir -p "output/Ghost Downloader.app/MacOS/plugins/" | ||
mv jy_os_page*.so "output/Ghost Downloader.app/MacOS/plugins/" | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Ghost-Downloader-v${{ env.VERSION }}-macOS-${{ matrix.architecture }} | ||
path: output/Ghost Downloader.app | ||
|
||
build-ubuntu: | ||
strategy: | ||
matrix: | ||
architecture: [x86_64, arm64] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libegl1-mesa | ||
pip install --timeout=300 -r requirements.txt | ||
pip install nuitka | ||
- name: Build with Nuitka | ||
run: | | ||
mv main.py "Ghost Downloader.py" | ||
python -c "import sys; sys.path.append('./app/common'); import config; print(config.VERSION)" > version.txt | ||
version=$(sed -n '4p' version.txt) | ||
echo "VERSION=$version" >> "$GITHUB_ENV" | ||
echo "VERSION=${{ env.VERSION }}" | ||
nuitka --standalone --enable-plugin=pyside6 --show-memory --output-dir=output --disable-console --company-name=XiaoYouChR --product-name="Ghost Downloader" --file-description="Ghost Downloader" --copyright="Copyright(C) 2024 XiaoYouChR" --file-version=$version --product-version=$version "Ghost Downloader.py" | ||
nuitka --module plugins/jy_os_page.py | ||
mkdir -p "output/Ghost Downloader.dist/plugins/" | ||
mv jy_os_page*.so "output/Ghost Downloader.dist/plugins/" | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Ghost-Downloader-v${{ env.VERSION }}-Linux-${{ matrix.architecture }} | ||
path: output/Ghost Downloader.dist |
This file was deleted.
Oops, something went wrong.