This commit is contained in:
parent
1bb3c19e23
commit
1fbcda623f
1 changed files with 12 additions and 15 deletions
|
@ -4,22 +4,22 @@ on: push
|
||||||
jobs:
|
jobs:
|
||||||
export_game:
|
export_game:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Export Game Job
|
name: Export Game
|
||||||
steps:
|
steps:
|
||||||
- name: checkout
|
- name: Checkout
|
||||||
uses: https://github.com/actions/checkout@v3.3.0
|
uses: https://github.com/actions/checkout@v3.3.0
|
||||||
- name: install packages
|
- name: Install Packages
|
||||||
id: wine_install
|
id: wine_install
|
||||||
run: |
|
run: |
|
||||||
apt update -y && apt upgrade -y
|
apt update -y && apt upgrade -y
|
||||||
apt install -y wine64 nodejs p7zip-full ca-certificates tree jq curl zip
|
apt install -y wine64 nodejs p7zip-full ca-certificates tree jq curl zip
|
||||||
echo "WINE_PATH=$(which wine64)" >> $GITHUB_OUTPUT
|
echo "WINE_PATH=$(which wine64)" >> $GITHUB_OUTPUT
|
||||||
- name: download godot build libs
|
- name: Download Godot build-libs
|
||||||
run: |
|
run: |
|
||||||
mkdir -p /root/.local/share/godot/
|
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_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
|
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: |
|
run: |
|
||||||
7z x /root/.local/share/godot/godot.zip -o/root/.local/share/godot/godot_executable -y
|
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
|
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
|
mkdir -p /root/.local/share/godot/export_templates
|
||||||
mv /root/.local/share/godot/4.0.stable /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
|
/root/.local/share/godot/godot_executable/Godot_v4.0-stable_linux.x86_64 --version
|
||||||
- name: export for linux
|
- name: Export for Linux
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ./builds/linux/
|
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
|
/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: |
|
run: |
|
||||||
cd builds
|
cd builds
|
||||||
tar -czvf linux.tar.gz -C linux/ .
|
tar -czvf linux.tar.gz -C linux/ .
|
||||||
- name: export for Windows
|
- name: Export for Windows
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ./builds/windows/
|
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
|
/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: |
|
run: |
|
||||||
cd builds
|
cd builds
|
||||||
cd windows; zip -r ../windows.zip *
|
cd windows; zip -r ../windows.zip *
|
||||||
cd ..
|
cd ..
|
||||||
- name: create release
|
- name: Create Release
|
||||||
run: |
|
run: |
|
||||||
echo "Getting last Release Tag"
|
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 }}' )
|
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,
|
\"prerelease\": true,
|
||||||
\"tag_name\": \"$VERSION\"
|
\"tag_name\": \"$VERSION\"
|
||||||
}")
|
}")
|
||||||
echo $ID Linux
|
|
||||||
ID=$(echo $ID | jq -r '.id')
|
ID=$(echo $ID | jq -r '.id')
|
||||||
echo "Uploading Build to Release"
|
echo $ID Upload Linux
|
||||||
curl -X 'POST' \
|
curl -X 'POST' \
|
||||||
"https://git.euph.dev/api/v1/repos/${{ github.repository }}/releases/$ID/assets?name=Linux.tar.gz" \
|
"https://git.euph.dev/api/v1/repos/${{ github.repository }}/releases/$ID/assets?name=Linux.tar.gz" \
|
||||||
-H 'accept: application/json' \
|
-H 'accept: application/json' \
|
||||||
-H 'Content-Type: multipart/form-data' \
|
-H 'Content-Type: multipart/form-data' \
|
||||||
-H 'Authorization: token ${{ secrets.RELEASE_TOKEN }}' \
|
-H 'Authorization: token ${{ secrets.RELEASE_TOKEN }}' \
|
||||||
-F 'attachment=@./builds/linux.tar.gz;type=application/gzip'
|
-F 'attachment=@./builds/linux.tar.gz;type=application/gzip'
|
||||||
echo $ID Windows
|
echo $ID Upload Windows
|
||||||
ID=$(echo $ID | jq -r '.id')
|
|
||||||
echo "Uploading Build to Release"
|
|
||||||
curl -X 'POST' \
|
curl -X 'POST' \
|
||||||
"https://git.euph.dev/api/v1/repos/${{ github.repository }}/releases/$ID/assets?name=Windows.zip" \
|
"https://git.euph.dev/api/v1/repos/${{ github.repository }}/releases/$ID/assets?name=Windows.zip" \
|
||||||
-H 'accept: application/json' \
|
-H 'accept: application/json' \
|
||||||
|
|
Loading…
Reference in a new issue