From 3aa561e9173ef6ad93d7781ccd2b3dcf20e3664e Mon Sep 17 00:00:00 2001 From: seanmaxwell Date: Mon, 17 Apr 2023 09:48:42 -0600 Subject: [PATCH] Update Release Action for Godot 4.0 (#105) * fix(release.yml): use new arguments for 4.0 * Update release.yml * Update release.yml * Update release.yml * Update manual_build.yml * support godot 4 * Revert "support godot 4" This reverts commit 5295542b0a753fa6f508bbc2fcaf9517e94a1181. * update for godot 4.0 * Update manual_build.yml * Update manual_build.yml --- .github/workflows/manual_build.yml | 4 ++++ .github/workflows/release.yml | 4 ++++ mono.Dockerfile | 12 +++++++----- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/manual_build.yml b/.github/workflows/manual_build.yml index 764e773..afd9051 100644 --- a/.github/workflows/manual_build.yml +++ b/.github/workflows/manual_build.yml @@ -45,6 +45,8 @@ jobs: GODOT_VERSION=${{ github.event.inputs.version }} RELEASE_NAME=${{ github.event.inputs.release_name }} SUBDIR=${{ github.event.inputs.release_name != 'stable' && format('/{0}', github.event.inputs.release_name) || '' }} + GODOT_TEST_ARGS=${{ startsWith( github.event.inputs.version, '3.' ) && '' || '--headless --quit' }} + GODOT_PLATFORM=${{ startsWith( github.event.inputs.version, '3.' ) && 'linux_headless.64' || 'linux.x86_64' }} build-mono: name: Build Mono Image runs-on: ubuntu-20.04 @@ -76,4 +78,6 @@ jobs: GODOT_VERSION=${{ github.event.inputs.version }} RELEASE_NAME=${{ github.event.inputs.release_name }} SUBDIR=${{ github.event.inputs.release_name != 'stable' && format('/{0}', github.event.inputs.release_name) || '' }} + ZIP_GODOT_PLATFORM=${{ startsWith( github.event.inputs.version, '3.' ) && 'linux_headless_64' || 'linux_x86_64' }} + FILENAME_GODOT_PLATFORM=${{ startsWith( github.event.inputs.version, '3.' ) && 'linux_headless.64' || 'linux.x86_64' }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8ccdc67..35f1904 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -49,6 +49,8 @@ jobs: build-args: | GODOT_VERSION=${{ needs.version.outputs.version }} RELEASE_NAME=${{ needs.version.outputs.release_name }} + GODOT_TEST_ARGS=${{ startsWith( needs.version.outputs.version, '3.' ) && '' || '--headless --quit' }} + GODOT_PLATFORM=${{ startsWith( needs.version.outputs.version, '3.' ) && 'linux_headless.64' || 'linux.x86_64' }} build-mono: name: Build Mono Image runs-on: ubuntu-20.04 @@ -81,4 +83,6 @@ jobs: build-args: | GODOT_VERSION=${{ needs.version.outputs.version }} RELEASE_NAME=${{ needs.version.outputs.release_name }} + ZIP_GODOT_PLATFORM=${{ startsWith( needs.version.outputs.version, '3.' ) && 'linux_headless_64' || 'linux_x86_64' }} + FILENAME_GODOT_PLATFORM=${{ startsWith( needs.version.outputs.version, '3.' ) && 'linux_headless.64' || 'linux.x86_64' }} diff --git a/mono.Dockerfile b/mono.Dockerfile index ebc3ea3..e7d1c57 100644 --- a/mono.Dockerfile +++ b/mono.Dockerfile @@ -27,19 +27,21 @@ ARG RELEASE_NAME="stable" # e.g. SUBDIR "/beta3" # Use an empty string "" when the RELEASE_NAME is "stable" ARG SUBDIR="" +ARG ZIP_GODOT_PLATFORM="linux_headless_64" +ARG FILENAME_GODOT_PLATFORM="linux_headless.64" -RUN wget https://downloads.tuxfamily.org/godotengine/${GODOT_VERSION}${SUBDIR}/mono/Godot_v${GODOT_VERSION}-${RELEASE_NAME}_mono_linux_headless_64.zip \ +RUN wget https://downloads.tuxfamily.org/godotengine/${GODOT_VERSION}${SUBDIR}/mono/Godot_v${GODOT_VERSION}-${RELEASE_NAME}_mono_${ZIP_GODOT_PLATFORM}.zip \ && wget https://downloads.tuxfamily.org/godotengine/${GODOT_VERSION}${SUBDIR}/mono/Godot_v${GODOT_VERSION}-${RELEASE_NAME}_mono_export_templates.tpz RUN mkdir ~/.cache \ && mkdir -p ~/.config/godot \ && mkdir -p ~/.local/share/godot/templates/${GODOT_VERSION}.${RELEASE_NAME}.mono \ - && unzip Godot_v${GODOT_VERSION}-${RELEASE_NAME}_mono_linux_headless_64.zip \ - && mv Godot_v${GODOT_VERSION}-${RELEASE_NAME}_mono_linux_headless_64/Godot_v${GODOT_VERSION}-${RELEASE_NAME}_mono_linux_headless.64 /usr/local/bin/godot \ - && mv Godot_v${GODOT_VERSION}-${RELEASE_NAME}_mono_linux_headless_64/GodotSharp /usr/local/bin/GodotSharp \ + && unzip Godot_v${GODOT_VERSION}-${RELEASE_NAME}_mono_${ZIP_GODOT_PLATFORM}.zip \ + && mv Godot_v${GODOT_VERSION}-${RELEASE_NAME}_mono_${ZIP_GODOT_PLATFORM}/Godot_v${GODOT_VERSION}-${RELEASE_NAME}_mono_${FILENAME_GODOT_PLATFORM} /usr/local/bin/godot \ + && mv Godot_v${GODOT_VERSION}-${RELEASE_NAME}_mono_${ZIP_GODOT_PLATFORM}/GodotSharp /usr/local/bin/GodotSharp \ && unzip Godot_v${GODOT_VERSION}-${RELEASE_NAME}_mono_export_templates.tpz \ && mv templates/* ~/.local/share/godot/templates/${GODOT_VERSION}.${RELEASE_NAME}.mono \ - && rm -f Godot_v${GODOT_VERSION}-${RELEASE_NAME}_mono_export_templates.tpz Godot_v${GODOT_VERSION}-${RELEASE_NAME}_mono_linux_headless_64.zip + && rm -f Godot_v${GODOT_VERSION}-${RELEASE_NAME}_mono_export_templates.tpz Godot_v${GODOT_VERSION}-${RELEASE_NAME}_mono_${ZIP_GODOT_PLATFORM}.zip ADD getbutler.sh /opt/butler/getbutler.sh RUN bash /opt/butler/getbutler.sh