„.gitea/workflows/build.yml“ ändern
All checks were successful
Export Game

This commit is contained in:
Snoweuph 2023-04-05 15:05:45 +00:00
parent 1bb3c19e23
commit 1fbcda623f

View file

@ -4,22 +4,22 @@ on: push
jobs:
export_game:
runs-on: ubuntu-latest
name: Export Game Job
name: Export Game
steps:
- name: checkout
- name: Checkout
uses: https://github.com/actions/checkout@v3.3.0
- name: install packages
- name: Install Packages
id: wine_install
run: |
apt update -y && apt upgrade -y
apt install -y wine64 nodejs p7zip-full ca-certificates tree jq curl zip
echo "WINE_PATH=$(which wine64)" >> $GITHUB_OUTPUT
- name: download godot build libs
- name: Download Godot build-libs
run: |
mkdir -p /root/.local/share/godot/
wget -nv https://downloads.tuxfamily.org/godotengine/4.0/Godot_v4.0-stable_linux.x86_64.zip -O "/root/.local/share/godot/godot.zip"
wget -nv https://downloads.tuxfamily.org/godotengine/4.0/Godot_v4.0-stable_export_templates.tpz -O /root/.local/share/godot/godot_templates.tpz
- name: setup godot build libs
- name: Setup Godot build-libs
run: |
7z x /root/.local/share/godot/godot.zip -o/root/.local/share/godot/godot_executable -y
chmod +x /root/.local/share/godot/godot_executable/Godot_v4.0-stable_linux.x86_64
@ -28,24 +28,24 @@ jobs:
mkdir -p /root/.local/share/godot/export_templates
mv /root/.local/share/godot/4.0.stable /root/.local/share/godot/export_templates
/root/.local/share/godot/godot_executable/Godot_v4.0-stable_linux.x86_64 --version
- name: export for linux
- name: Export for Linux
run: |
mkdir -p ./builds/linux/
/root/.local/share/godot/godot_executable/Godot_v4.0-stable_linux.x86_64 /var/lib/actions/project.godot --headless -q --export-release "Linux/X11" ./builds/linux/Game.x86_64
- name: package for linux
- name: Package for Linux
run: |
cd builds
tar -czvf linux.tar.gz -C linux/ .
- name: export for Windows
- name: Export for Windows
run: |
mkdir -p ./builds/windows/
/root/.local/share/godot/godot_executable/Godot_v4.0-stable_linux.x86_64 /var/lib/actions/project.godot --headless -q --export-release "Windows Desktop" ./builds/windows/Game.exe
- name: package for windows
- name: Package for Windows
run: |
cd builds
cd windows; zip -r ../windows.zip *
cd ..
- name: create release
- name: Create Release
run: |
echo "Getting last Release Tag"
VERSION=$(curl -X 'GET' 'https://git.euph.dev/api/v1/repos/${{ github.repository }}/releases?pre-release=true&page=1&limit=1' -H 'accept: application/json' -H 'Authorization: token ${{ secrets.RELEASE_TOKEN }}' )
@ -64,18 +64,15 @@ jobs:
\"prerelease\": true,
\"tag_name\": \"$VERSION\"
}")
echo $ID Linux
ID=$(echo $ID | jq -r '.id')
echo "Uploading Build to Release"
echo $ID Upload Linux
curl -X 'POST' \
"https://git.euph.dev/api/v1/repos/${{ github.repository }}/releases/$ID/assets?name=Linux.tar.gz" \
-H 'accept: application/json' \
-H 'Content-Type: multipart/form-data' \
-H 'Authorization: token ${{ secrets.RELEASE_TOKEN }}' \
-F 'attachment=@./builds/linux.tar.gz;type=application/gzip'
echo $ID Windows
ID=$(echo $ID | jq -r '.id')
echo "Uploading Build to Release"
echo $ID Upload Windows
curl -X 'POST' \
"https://git.euph.dev/api/v1/repos/${{ github.repository }}/releases/$ID/assets?name=Windows.zip" \
-H 'accept: application/json' \