-
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fix rcedit and wine not working - Add comments - Cache Godot binaries - Use Godot 4.2.2-rc3 - Run exports in parallel - Report error if no artifacts are uploaded - General overhaul
- Loading branch information
1 parent
949d553
commit 0628aae
Showing
5 changed files
with
131 additions
and
61 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: Export Godot project | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Export | ||
shell: bash | ||
run: | | ||
mkdir -v -p ~/build/${BUILD_NAME} | ||
godot --headless --export-release "${PLATFORM}" ~/build/${BUILD_NAME}/${PROJECT_NAME}.${EXTENSION} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Set up Godot | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Make folders | ||
shell: bash | ||
run: | | ||
# Set up folders for Godot editor and export templates. | ||
# This is done before the download step because this uses caching and doesn't always need to download. | ||
# The ~/godot directory is for the editor, so it can be added to PATH. | ||
mkdir -v -p ~/.local/share/godot/export_templates/${GODOT_VERSION}.${GODOT_RELEASE} | ||
mkdir -v -p ~/godot | ||
- name: Use cache | ||
id: godot-cache | ||
uses: | ||
actions/cache@v4 | ||
with: | ||
key: ${{ env.GODOT_VERSION }}-${{ env.GODOT_RELEASE }} | ||
path: | | ||
~/.local/share/godot/export_templates/${{ env.GODOT_VERSION }}.${{ env.GODOT_RELEASE }} | ||
~/godot | ||
- name: Download Godot | ||
if: ${{ steps.godot-cache.outputs.cache-hit != 'true' }} | ||
shell: bash | ||
run: | | ||
# Download Godot editor and export templates from godot-builds repo. | ||
wget -q https://github.com/godotengine/godot-builds/releases/download/${GODOT_VERSION}-${GODOT_RELEASE}/Godot_v${GODOT_VERSION}-${GODOT_RELEASE}_export_templates.tpz & | ||
wget -q https://github.com/godotengine/godot-builds/releases/download/${GODOT_VERSION}-${GODOT_RELEASE}/Godot_v${GODOT_VERSION}-${GODOT_RELEASE}_linux.x86_64.zip & | ||
wait | ||
# Unpack the files. | ||
unzip Godot_v${GODOT_VERSION}-${GODOT_RELEASE}_linux.x86_64.zip -d ~ & | ||
unzip Godot_v${GODOT_VERSION}-${GODOT_RELEASE}_export_templates.tpz -d ~ & | ||
wait | ||
# Move to correct places. | ||
mv ~/templates/* ~/.local/share/godot/export_templates/${GODOT_VERSION}.${GODOT_RELEASE} | ||
mv ~/Godot_v${GODOT_VERSION}-${GODOT_RELEASE}_linux.x86_64 ~/godot/godot | ||
- name: Add Godot to path | ||
shell: bash | ||
run: echo "~/godot" >> $GITHUB_PATH |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: dev-desktop | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
|
||
env: | ||
GODOT_VERSION: 4.2.2 | ||
GODOT_RELEASE: rc3 | ||
PROJECT_NAME: GodSVG | ||
|
||
|
||
jobs: | ||
export-windows: | ||
name: Export GodSVG for Windows | ||
runs-on: ubuntu-latest | ||
env: | ||
PLATFORM: "Windows Desktop" | ||
EXTENSION: "exe" | ||
BUILD_NAME: "windows-64bit" | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
- name: Set up Godot | ||
uses: ./.github/actions/set-up-godot | ||
- name: Set up WINE and rcedit for Windows export | ||
run: | | ||
# Download rcedit and intall wine. | ||
wget -q https://github.com/electron/rcedit/releases/download/v1.1.1/rcedit-x64.exe | ||
sudo apt install wine64 | ||
# Move rcedit to different place. | ||
mkdir -v -p ~/.local/share/rcedit | ||
mv rcedit-x64.exe ~/.local/share/rcedit | ||
# CD out of project directory so Godot doesn't load it. | ||
cd ~ | ||
# Run Godot to generate editor config file. | ||
godot --headless --quit | ||
# Add wine and rcedit paths to Godot config. | ||
echo 'export/windows/wine = "/usr/bin/wine64"' >> ~/.config/godot/editor_settings-4.tres | ||
echo 'export/windows/rcedit = "/home/runner/.local/share/rcedit/rcedit-x64.exe"' >> ~/.config/godot/editor_settings-4.tres | ||
- name: Export project | ||
uses: ./.github/actions/godot-export | ||
- name: Upload Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ env.BUILD_NAME }} | ||
path: ~/build/${{ env.BUILD_NAME }}/ | ||
if-no-files-found: error | ||
retention-days: 14 | ||
|
||
export-linux: | ||
name: Export GodSVG for Linux | ||
runs-on: ubuntu-latest | ||
env: | ||
PLATFORM: "Linux/X11" | ||
EXTENSION: "x86_64" | ||
BUILD_NAME: "linux-64bit" | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
- name: Set up Godot | ||
uses: ./.github/actions/set-up-godot | ||
- name: Export project | ||
uses: ./.github/actions/godot-export | ||
- name: Make Linux export runnable | ||
run: | | ||
# Set run permission. | ||
chmod +x ~/build/${BUILD_NAME}/${PROJECT_NAME}.x86_64 | ||
cd ~/build | ||
tar zcvf ${BUILD_NAME}.tar.gz ${BUILD_NAME} | ||
- name: Upload Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ env.BUILD_NAME }} | ||
path: ~/build/${{ env.BUILD_NAME }}.tar.gz | ||
if-no-files-found: error | ||
retention-days: 14 |
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