MOAR BIFURCATION
This commit is contained in:
@@ -6,7 +6,7 @@ on:
|
|||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build-x86_64:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -31,14 +31,49 @@ jobs:
|
|||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: executable
|
name: executable-x86_64
|
||||||
path: app/dist/wolServer
|
path: app/dist/wolServer
|
||||||
|
|
||||||
|
build-arm:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Docker
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
|
- name: Build ARM Executable
|
||||||
|
run: |
|
||||||
|
docker run --rm -v $(pwd):/src:Z -w /src \
|
||||||
|
--platform linux/arm/v7 \
|
||||||
|
python:3.11-slim-buster /bin/sh -c "
|
||||||
|
python -m pip install --upgrade pip &&
|
||||||
|
pip install pyinstaller &&
|
||||||
|
cd app &&
|
||||||
|
pyinstaller --onefile --add-data 'ui:ui' wolServer.py
|
||||||
|
"
|
||||||
|
|
||||||
|
- name: Upload ARM Artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: executable-arm
|
||||||
|
path: app/dist/wolServer
|
||||||
|
|
||||||
|
release:
|
||||||
|
needs: [build-x86_64, build-arm]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
env:
|
env:
|
||||||
GITEA_TOKEN: ${{ secrets.mytoken }}
|
GITEA_TOKEN: ${{ secrets.mytoken }}
|
||||||
run: |
|
run: |
|
||||||
curl -X POST "https://git.konsthol.eu/api/v1/repos/konsthol/WOL-Ly/releases" \
|
release_id=$(curl -X POST "https://git.konsthol.eu/api/v1/repos/konsthol/WOL-Ly/releases" \
|
||||||
-H "Authorization: token ${{ secrets.mytoken }}" \
|
-H "Authorization: token ${{ secrets.mytoken }}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d '{
|
-d '{
|
||||||
@@ -48,13 +83,22 @@ jobs:
|
|||||||
"body": "Release description",
|
"body": "Release description",
|
||||||
"draft": false,
|
"draft": false,
|
||||||
"prerelease": false
|
"prerelease": false
|
||||||
}'
|
}' | jq -r '.id')
|
||||||
|
|
||||||
- name: Upload Executable to Release
|
- name: Upload x86_64 Executable to Release
|
||||||
env:
|
env:
|
||||||
GITEA_TOKEN: ${{ secrets.mytoken }}
|
GITEA_TOKEN: ${{ secrets.mytoken }}
|
||||||
run: |
|
run: |
|
||||||
curl --data-binary "@app/dist/wolServer" \
|
curl --data-binary "@app/dist/wolServer" \
|
||||||
-H "Authorization: token ${{ secrets.mytoken }}" \
|
-H "Authorization: token ${{ secrets.mytoken }}" \
|
||||||
-H "Content-Type: application/octet-stream" \
|
-H "Content-Type: application/octet-stream" \
|
||||||
"https://git.konsthol.eu/api/v1/repos/konsthol/WOL-Ly/releases/$(curl -s https://git.konsthol.eu/api/v1/repos/konsthol/WOL-Ly/releases/latest | jq -r '.id')/assets?name=wolServer"
|
"https://git.konsthol.eu/api/v1/repos/konsthol/WOL-Ly/releases/${release_id}/assets?name=wolServer-x86_64"
|
||||||
|
|
||||||
|
- name: Upload ARM Executable to Release
|
||||||
|
env:
|
||||||
|
GITEA_TOKEN: ${{ secrets.mytoken }}
|
||||||
|
run: |
|
||||||
|
curl --data-binary "@app/dist/wolServer" \
|
||||||
|
-H "Authorization: token ${{ secrets.mytoken }}" \
|
||||||
|
-H "Content-Type: application/octet-stream" \
|
||||||
|
"https://git.konsthol.eu/api/v1/repos/konsthol/WOL-Ly/releases/${release_id}/assets?name=wolServer-arm"
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ RestartSec=3
|
|||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
wget -O app/wolServer
|
wget -O app/wolServer https://git.konsthol.eu/konsthol/WOL-Ly/releases/download/v1.0.0/wolServer
|
||||||
chmod +x app/wolServer
|
chmod +x app/wolServer
|
||||||
|
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
|
|||||||
Reference in New Issue
Block a user