ci/cd: fix syntax #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI/CD | |
on: | |
push: | |
pull_request: | |
env: | |
GODOT_VERSION: 4.1.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 headless linux server and templates | |
if: steps.cache-godot.outputs.cache-hit != 'true' | |
run: | | |
wget -q https://downloads.tuxfamily.org/godotengine/${{ env.GODOT_VERSION }}/Godot_v${{ env.GODOT_VERSION }}-stable_linux.x86_64.zip | |
wget -q https://downloads.tuxfamily.org/godotengine/${{ env.GODOT_VERSION }}/Godot_v${{ env.GODOT_VERSION }}-stable_export_templates.tpz | |
mkdir ~/.cache | |
mkdir -p ~/.config/godot | |
mkdir -p ~/.local/share/godot/templates/${{ env.GODOT_VERSION }}.stable | |
unzip Godot_v${{ env.GODOT_VERSION }}-stable_linux.x86_64.zip | |
mv Godot_v${{ env.GODOT_VERSION }}-stable_linux_headless.64 /usr/local/bin/godot | |
unzip Godot_v${{ env.GODOT_VERSION }}-stable_export_templates.tpz | |
mv templates/* ~/.local/share/godot/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 -e -q | |
#################### | |
# WINDOWS | |
#################### | |
- name: Prepare export_presets.cfg for Windows | |
run: cp app/export_presets.cfg.windows.example cp app/export_presets.cfg | |
- name: Export Godot 4 | |
run: godot --headless --path app/project.godot --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" | |
#################### | |
# Linux | |
#################### | |
- name: Prepare export_presets.cfg for Linux | |
run: cp app/export_presets.cfg.linux.example cp app/export_presets.cfg | |
- name: Export Godot 4 | |
run: godot --headless --path app/project.godot --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 Linux" |