Skip to content

ci/cd: use godot 4.3 #79

ci/cd: use godot 4.3

ci/cd: use godot 4.3 #79

Workflow file for this run

name: CI/CD
on:
push:
pull_request:
env:
GODOT_VERSION: 4.3
jobs:
deploy:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v2
- name: Cache Godot files
id: cache-godot
uses: actions/cache@v3
with:
path: |
~/.local/share/godot/**
/usr/local/bin/godot
~/.config/godot/**
key: ${{ runner.os }}-godot-${{ env.GODOT_VERSION }}
- name: Download and config Godot Engine linux server and templates
if: steps.cache-godot.outputs.cache-hit != 'true'
run: |
wget -q https://github.com/godotengine/godot/releases/download/${{ env.GODOT_VERSION }}-stable/Godot_v${{ env.GODOT_VERSION }}-stable_linux.x86_64.zip
wget -q https://github.com/godotengine/godot/releases/download/${{ env.GODOT_VERSION }}-stable/Godot_v${{ env.GODOT_VERSION }}-stable_export_templates.tpz
mkdir ~/.cache
mkdir -p ~/.config/godot
mkdir -p ~/.local/share/godot/export_templates/${{ env.GODOT_VERSION }}.stable
unzip Godot_v${{ env.GODOT_VERSION }}-stable_linux.x86_64.zip
mv Godot_v${{ env.GODOT_VERSION }}-stable_linux.x86_64 /usr/local/bin/godot
unzip Godot_v${{ env.GODOT_VERSION }}-stable_export_templates.tpz
mv templates/* ~/.local/share/godot/export_templates/${{ env.GODOT_VERSION }}.stable
rm -f Godot_v${{ env.GODOT_VERSION }}-stable_linux.x86_64.zip Godot_v${{ env.GODOT_VERSION }}-stable_export_templates.tpz
godot --headless --editor --quit
####################
# WINDOWS
####################
- name: Prepare export_presets.cfg for Windows
run: cp app/export_presets.cfg.windows.example app/export_presets.cfg
- name: Export Godot 4
run: godot --headless --path app/ --export-release 'Windows Desktop' ../SFSCON_Pdf_Downloader.exe
- name: Upload binaries to Github release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./SFSCON_Pdf_Downloader.exe
asset_name: SFSCON_Pdf_Downloader.exe
tag: ${{ github.ref }}
overwrite: true
body: "SFSCON Pdf Downloader tool for Windows and Linux"
####################
# Linux
####################
- name: Prepare export_presets.cfg for Linux
run: cp app/export_presets.cfg.linux.example app/export_presets.cfg
- name: Export Godot 4
run: godot --headless --path app/ --export-release 'Linux/X11' ../SFSCON_Pdf_Downloader.x86_64
- name: Upload binaries to Github release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./SFSCON_Pdf_Downloader.x86_64
asset_name: SFSCON_Pdf_Downloader.x86_64
tag: ${{ github.ref }}
overwrite: true
body: "SFSCON Pdf Downloader tool for Windows and Linux"