[ssssss] New Snake Game #77
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: "Export Release" | |
on: | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
branches: | |
- main | |
- dev | |
push: | |
tags: | |
- '*' | |
env: | |
GODOT_VERSION: 4.3 | |
jobs: | |
export: | |
name: Export (Release) | |
runs-on: windows-2022 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup | |
run: | | |
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser | |
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression | |
Join-Path (Resolve-Path ~).Path "scoop\shims" >> $Env:GITHUB_PATH | |
scoop bucket add extras | |
scoop install extras/godot@$env:GODOT_VERSION | |
scoop install main/rcedit | |
scoop install main/zip | |
Write-Output "Installing Godot Export Templates" | |
$url = "https://github.com/godotengine/godot/releases/download/$env:GODOT_VERSION-stable/Godot_v$env:GODOT_VERSION-stable_export_templates.tpz" | |
$target = "~/Godot_v$env:GODOT_VERSION-stable_export_templates.tpz" | |
$templates_dir = "~/AppData/Roaming/Godot/export_templates" | |
New-Item -ItemType Directory -Force $templates_dir | Out-Null | |
Invoke-WebRequest -Uri $url -OutFile $target | |
Expand-Archive -Path $target -DestinationPath $templates_dir -Force | |
Rename-Item -Path $templates_dir/templates -NewName "$($env:GODOT_VERSION).stable" -Force | |
Write-Output "Installing Godot editor configuration" | |
Copy-Item ./.github/dist/editor_settings-4.tres -Destination ~/AppData/Roaming/Godot | |
- name: Export Projects | |
run: ./build.ps1 -c -m release | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: release_build | |
path: build/release/* | |
compression-level: 0 | |
if-no-files-found: error |