Corrected mistakes
This commit is contained in:
@@ -7,53 +7,40 @@ on:
|
||||
- completed
|
||||
|
||||
jobs:
|
||||
build-x86_64:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
arch: [x86_64, arm64]
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Set up Python
|
||||
- name: Set up Python (x86_64)
|
||||
if: matrix.arch == 'x86_64'
|
||||
uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: '3.14'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
|
||||
- name: Build with PyInstaller
|
||||
run: |
|
||||
cd app
|
||||
pyinstaller --onefile --add-data "ui:ui" wolServer.py
|
||||
|
||||
- name: Upload x86_64 Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: executable-x86_64
|
||||
path: app/dist/wolServer
|
||||
|
||||
build-arm:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Install QEMU
|
||||
- name: Install QEMU (arm)
|
||||
if: matrix.arch == 'arm64'
|
||||
uses: docker/setup-qemu-action@v3
|
||||
with:
|
||||
platforms: arm64
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
- name: Set up Docker Buildx (arm)
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
platforms: linux/arm64
|
||||
|
||||
- name: Build ARM Executable
|
||||
- name: Build Executable
|
||||
run: |
|
||||
if [ "${{ matrix.arch }}" = "x86_64" ]; then
|
||||
pip install -r requirements.txt
|
||||
cd app
|
||||
pyinstaller --onefile --add-data "ui:ui" wolServer.py
|
||||
else
|
||||
docker buildx build --platform linux/arm64/v8 -t arm-builder --load --file - . <<EOF
|
||||
FROM arm64v8/python:3.13-slim-bullseye
|
||||
WORKDIR /app
|
||||
@@ -66,24 +53,20 @@ jobs:
|
||||
&& cd /app/app \
|
||||
&& pyinstaller --onefile --add-data "ui:ui" wolServer.py
|
||||
EOF
|
||||
|
||||
- name: Create Dist Directory
|
||||
run: mkdir -p app/dist
|
||||
|
||||
- name: Extract ARM Executable
|
||||
run: |
|
||||
mkdir -p app/dist
|
||||
container_id=$(docker create --platform linux/arm64/v8 arm-builder)
|
||||
docker cp $container_id:/app/app/dist/wolServer app/dist/wolServer
|
||||
docker rm $container_id
|
||||
fi
|
||||
|
||||
- name: Upload ARM Artifact
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: executable-arm
|
||||
name: executable-${{ matrix.arch }}
|
||||
path: app/dist/wolServer
|
||||
|
||||
release:
|
||||
needs: [build-x86_64, build-arm]
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
@@ -93,31 +76,17 @@ jobs:
|
||||
- name: Create Dist Directory
|
||||
run: mkdir -p app/dist
|
||||
|
||||
- name: Download x86_64 Artifact
|
||||
- name: Download Artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: executable-x86_64
|
||||
path: app/dist
|
||||
|
||||
- name: Verify x86_64 Artifact
|
||||
run: ls -la app/dist
|
||||
- name: Rename Artifacts
|
||||
run: |
|
||||
mv app/dist/executable-x86_64/wolServer app/dist/wolServer-x86_64 || true
|
||||
mv app/dist/executable-arm64/wolServer app/dist/wolServer-arm || true
|
||||
|
||||
- name: Rename x86_64 Artifact
|
||||
run: mv app/dist/wolServer app/dist/wolServer-x86_64
|
||||
|
||||
- name: Download ARM Artifact
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: executable-arm
|
||||
path: app/dist
|
||||
|
||||
- name: Verify ARM Artifact
|
||||
run: ls -la app/dist
|
||||
|
||||
- name: Rename ARM Artifact
|
||||
run: mv app/dist/wolServer app/dist/wolServer-arm
|
||||
|
||||
- name: Generate Tag Name
|
||||
- name: Generate Tag
|
||||
id: tag
|
||||
run: echo "TAG=v$(TZ='Europe/Athens' date +'%d%m%Y%H%M%S')" >> $GITEA_ENV
|
||||
|
||||
@@ -130,10 +99,10 @@ jobs:
|
||||
body: "Automated push release"
|
||||
token: ${{ secrets.mytoken }}
|
||||
files: |-
|
||||
app/dist/**
|
||||
app/dist/wolServer-*
|
||||
|
||||
cleanup:
|
||||
needs: [release]
|
||||
needs: release
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
Reference in New Issue
Block a user