Skip to content

Commit

Permalink
add linux frozen build
Browse files Browse the repository at this point in the history
  • Loading branch information
jxxghp committed Nov 17, 2023
1 parent c7c222b commit 03e0118
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 2 deletions.
66 changes: 64 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:

- name: Pyinstaller
run: |
pyinstaller windows.spec
pyinstaller frozen.spec
shell: pwsh

- name: Upload Windows File
Expand All @@ -119,10 +119,71 @@ jobs:
name: windows
path: dist/MoviePilot.exe

Linux-build:
runs-on: ubuntu-latest
name: Build Linux Binary
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Init Python 3.11.4
uses: actions/setup-python@v4
with:
python-version: '3.11.4'
cache: 'pip'

- name: Install Dependent Packages
run: |
python -m pip install --upgrade pip
pip install wheel pyinstaller
pip install -r requirements.txt
- name: Prepare Frontend
run: |
wget http://nginx.org/download/nginx-1.25.2.zip
unzip nginx-1.25.2.zip
mv nginx-1.25.2/nginx-1.25.2 nginx
rm nginx-1.25.2.zip
rm -rf nginx-1.25.2
FRONTEND_VERSION=$(curl -s "https://api.github.com/repos/jxxghp/MoviePilot-Frontend/releases/latest" | jq -r .tag_name)
wget "https://github.com/jxxghp/MoviePilot-Frontend/releases/download/$FRONTEND_VERSION/dist.zip"
unzip dist.zip
mv dist/dist/* nginx/html
rm dist.zip
rm -rf dist
mv nginx/html/nginx.conf nginx/conf/nginx.conf
mkdir -p nginx/temp
touch nginx/temp/__keep__.txt
mkdir -p nginx/logs
touch nginx/logs/__keep__.txt
wget https://github.com/jxxghp/MoviePilot-Plugins/archive/refs/heads/main.zip
unzip MoviePilot-Plugins-main.zip
mv MoviePilot-Plugins-main/MoviePilot-Plugins-main/plugins/* app/plugins/
rm MoviePilot-Plugins-main.zip
rm -rf MoviePilot-Plugins-main
wget https://github.com/jxxghp/MoviePilot-Resources/archive/refs/heads/main.zip
unzip MoviePilot-Resources-main.zip
mv MoviePilot-Resources-main/MoviePilot-Resources-main/resources/* app/helper/
rm MoviePilot-Resources-main.zip
rm -rf MoviePilot-Resources-main
- name: Pyinstaller
run: |
pyinstaller frozen.spec
- name: Upload Ubuntu File
uses: actions/upload-artifact@v3
with:
name: ubuntu
path: dist/MoviePilot

Create-release:
permissions: write-all
runs-on: ubuntu-latest
needs: [ Windows-build, Docker-build ]
needs: [ Windows-build, Docker-build, Linux-build ]
steps:
- uses: actions/checkout@v2

Expand All @@ -140,6 +201,7 @@ jobs:
run: |
mkdir releases
mv ./windows/MoviePilot.exe ./releases/MoviePilot_v${{ env.app_version }}.exe
mv ./ubuntu/dist/MoviePilot ./releases/MoviePilot_amd64_v${{ env.app_version }}
- name: Create Release
id: create_release
Expand Down
File renamed without changes.

0 comments on commit 03e0118

Please sign in to comment.