Release 0.0.13 #19
Workflow file for this run
This file contains hidden or 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: Release | |
| on: | |
| release: | |
| types: | |
| - published | |
| workflow_dispatch: | |
| inputs: | |
| release_tag: | |
| description: Tag to build and publish assets for | |
| required: true | |
| type: string | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: release-${{ github.ref }} | |
| cancel-in-progress: false | |
| env: | |
| GODOT_VERSION: 4.2.2 | |
| GODOT_STATUS: stable | |
| GODOT_LINUX_URL: https://github.com/godotengine/godot-builds/releases/download/4.2.2-stable/Godot_v4.2.2-stable_linux.x86_64.zip | |
| GODOT_TEMPLATES_URL: https://github.com/godotengine/godot-builds/releases/download/4.2.2-stable/Godot_v4.2.2-stable_export_templates.tpz | |
| GODOT_MACOS_URL: https://github.com/godotengine/godot-builds/releases/download/4.2.2-stable/Godot_v4.2.2-stable_macos.universal.zip | |
| RELEASE_TAG: ${{ github.event_name == 'release' && github.event.release.tag_name || inputs.release_tag }} | |
| jobs: | |
| linux: | |
| name: Linux export | |
| runs-on: [windowstead, linux, x64] | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| ref: ${{ env.RELEASE_TAG }} | |
| - name: Verify Python | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| python3 --version | |
| - name: Download Godot | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| mkdir -p .tools | |
| curl -fsSL "$GODOT_LINUX_URL" -o /tmp/godot_linux.zip | |
| unzip -oq /tmp/godot_linux.zip -d .tools/ | |
| chmod +x .tools/Godot_v4.2.2-stable_linux.x86_64 | |
| - name: Install export templates | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| mkdir -p ~/.local/share/godot/export_templates/${GODOT_VERSION}.${GODOT_STATUS} | |
| curl -fsSL "$GODOT_TEMPLATES_URL" -o /tmp/godot_export_templates.tpz | |
| unzip -oq /tmp/godot_export_templates.tpz -d /tmp/godot_export_templates | |
| cp -f /tmp/godot_export_templates/templates/* ~/.local/share/godot/export_templates/${GODOT_VERSION}.${GODOT_STATUS}/ | |
| - name: Export Linux build | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| mkdir -p build/release/linux | |
| .tools/Godot_v4.2.2-stable_linux.x86_64 --headless --path . --export-release "Linux/X11" ./build/release/linux/windowstead.x86_64 | |
| python3 - <<'PY' | |
| from pathlib import Path | |
| import zipfile | |
| archive = Path("build/windowstead-linux.zip") | |
| base = Path("build/release/linux") | |
| with zipfile.ZipFile(archive, "w", compression=zipfile.ZIP_DEFLATED) as zf: | |
| for relative in [Path("windowstead.x86_64"), Path("windowstead.pck")]: | |
| zf.write(base / relative, relative.as_posix()) | |
| PY | |
| - name: Upload release asset | |
| uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3 | |
| with: | |
| tag_name: ${{ env.RELEASE_TAG }} | |
| files: build/windowstead-linux.zip | |
| fail_on_unmatched_files: true | |
| windows: | |
| name: Windows export | |
| runs-on: [windowstead, linux, x64] | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| ref: ${{ env.RELEASE_TAG }} | |
| - name: Verify Python | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| python3 --version | |
| - name: Download Godot | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| mkdir -p .tools | |
| curl -fsSL "$GODOT_LINUX_URL" -o /tmp/godot_linux.zip | |
| unzip -oq /tmp/godot_linux.zip -d .tools/ | |
| chmod +x .tools/Godot_v4.2.2-stable_linux.x86_64 | |
| - name: Install export templates | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| mkdir -p ~/.local/share/godot/export_templates/${GODOT_VERSION}.${GODOT_STATUS} | |
| curl -fsSL "$GODOT_TEMPLATES_URL" -o /tmp/godot_export_templates.tpz | |
| unzip -oq /tmp/godot_export_templates.tpz -d /tmp/godot_export_templates | |
| cp -f /tmp/godot_export_templates/templates/* ~/.local/share/godot/export_templates/${GODOT_VERSION}.${GODOT_STATUS}/ | |
| - name: Export Windows build | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| mkdir -p build/release/windows | |
| .tools/Godot_v4.2.2-stable_linux.x86_64 --headless --path . --export-release "Windows Desktop" ./build/release/windows/windowstead.exe | |
| python3 - <<'PY' | |
| from pathlib import Path | |
| import zipfile | |
| archive = Path("build/windowstead-windows.zip") | |
| base = Path("build/release/windows") | |
| with zipfile.ZipFile(archive, "w", compression=zipfile.ZIP_DEFLATED) as zf: | |
| for relative in [Path("windowstead.exe"), Path("windowstead.pck")]: | |
| zf.write(base / relative, relative.as_posix()) | |
| PY | |
| - name: Upload release asset | |
| uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3 | |
| with: | |
| tag_name: ${{ env.RELEASE_TAG }} | |
| files: build/windowstead-windows.zip | |
| fail_on_unmatched_files: true | |
| macos: | |
| name: macOS export | |
| runs-on: [windowstead, macos, arm64] | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| ref: ${{ env.RELEASE_TAG }} | |
| - name: Install Godot and export templates | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| GODOT_TEMPLATES_DIR="$HOME/Library/Application Support/Godot/export_templates/${GODOT_VERSION}.${GODOT_STATUS}" | |
| mkdir -p "$GODOT_TEMPLATES_DIR" | |
| curl -fsSL "$GODOT_TEMPLATES_URL" -o /tmp/godot_export_templates.tpz | |
| unzip -oq /tmp/godot_export_templates.tpz -d /tmp/godot_export_templates | |
| cp -f /tmp/godot_export_templates/templates/* "$GODOT_TEMPLATES_DIR/" | |
| mkdir -p .tools/macos | |
| curl -fsSL "$GODOT_MACOS_URL" -o /tmp/godot_macos.zip | |
| unzip -oq /tmp/godot_macos.zip -d .tools/macos | |
| - name: Export macOS build | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| mkdir -p build/release/macos | |
| GODOT_MAC_APP=$(find .tools/macos -maxdepth 2 -name 'Godot.app' -print -quit) | |
| if [ -z "$GODOT_MAC_APP" ]; then | |
| echo 'Godot.app not found in downloaded macOS archive' >&2 | |
| exit 1 | |
| fi | |
| "$GODOT_MAC_APP/Contents/MacOS/Godot" --headless --path . --export-release "macOS" ./build/release/macos/windowstead.app | |
| python3 - <<'PY' | |
| from pathlib import Path | |
| import zipfile | |
| archive = Path("build/windowstead-macos.zip") | |
| base = Path("build/release/macos") | |
| with zipfile.ZipFile(archive, "w", compression=zipfile.ZIP_DEFLATED) as zf: | |
| pck_path = base / "windowstead.pck" | |
| if pck_path.is_file(): | |
| zf.write(pck_path, pck_path.relative_to(base).as_posix()) | |
| app_root = base / "windowstead.app" | |
| for path in app_root.rglob("*"): | |
| if path.is_file(): | |
| zf.write(path, path.relative_to(base).as_posix()) | |
| PY | |
| - name: Upload release asset | |
| uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3 | |
| with: | |
| tag_name: ${{ env.RELEASE_TAG }} | |
| files: build/windowstead-macos.zip | |
| fail_on_unmatched_files: true |