Gross hack because Matt doesn't know how to code

This commit is contained in:
2024-12-15 20:43:42 +02:00
parent f76855457a
commit 455a750199
+27 -4
View File
@@ -126,10 +126,8 @@ jobs:
name: executable-x86_64 name: executable-x86_64
path: app/dist path: app/dist
- name: Extract and Rename x86_64 Artifact - name: Verify x86_64 Artifact
run: | run: ls -la app/dist
unzip app/dist/executable-x86_64.zip -d app/dist
mv app/dist/wolServer app/dist/wolServer-x86_64
- name: Download ARM Artifact - name: Download ARM Artifact
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
@@ -137,10 +135,26 @@ jobs:
name: executable-arm name: executable-arm
path: app/dist path: app/dist
- name: Verify ARM Artifact
run: ls -la app/dist
- name: Extract and Rename x86_64 Artifact
run: |
if [ -f "app/dist/executable-x86_64.zip" ]; then
unzip app/dist/executable-x86_64.zip -d app/dist
mv app/dist/wolServer app/dist/wolServer-x86_64
else
echo "x86_64 artifact not found"
fi
- name: Extract and Rename ARM Artifact - name: Extract and Rename ARM Artifact
run: | run: |
if [ -f "app/dist/executable-arm.zip" ]; then
unzip app/dist/executable-arm.zip -d app/dist unzip app/dist/executable-arm.zip -d app/dist
mv app/dist/wolServer app/dist/wolServer-arm mv app/dist/wolServer app/dist/wolServer-arm
else
echo "ARM artifact not found"
fi
- name: Create Release - name: Create Release
env: env:
@@ -162,16 +176,25 @@ jobs:
env: env:
GITEA_TOKEN: ${{ secrets.mytoken }} GITEA_TOKEN: ${{ secrets.mytoken }}
run: | run: |
if [ -f "app/dist/wolServer-x86_64" ]; then
curl --data-binary "@app/dist/wolServer-x86_64" \ curl --data-binary "@app/dist/wolServer-x86_64" \
-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/${release_id}/assets?name=wolServer-x86_64" "https://git.konsthol.eu/api/v1/repos/konsthol/WOL-Ly/releases/${release_id}/assets?name=wolServer-x86_64"
else
echo "x86_64 executable not found"
fi
- name: Upload ARM Executable to Release - name: Upload ARM Executable to Release
env: env:
GITEA_TOKEN: ${{ secrets.mytoken }} GITEA_TOKEN: ${{ secrets.mytoken }}
run: | run: |
if [ -f "app/dist/wolServer-arm" ]; then
curl --data-binary "@app/dist/wolServer-arm" \ curl --data-binary "@app/dist/wolServer-arm" \
-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/${release_id}/assets?name=wolServer-arm" "https://git.konsthol.eu/api/v1/repos/konsthol/WOL-Ly/releases/${release_id}/assets?name=wolServer-arm"
else
echo "ARM executable not found"
fi