139 lines
4.0 KiB
YAML
139 lines
4.0 KiB
YAML
name: Build and Export
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: 'Version to build (e.g., 2.3.8)'
|
|
required: true
|
|
type: string
|
|
|
|
jobs:
|
|
build-windows:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
|
|
steps:
|
|
- name: Checkout Source Code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Godot
|
|
uses: chickensoft-games/setup-godot@v1
|
|
with:
|
|
version: '4.3.0'
|
|
use-dotnet: false
|
|
|
|
- name: Setup Export Templates
|
|
run: |
|
|
mkdir -p ~/.local/share/godot/export_templates/4.3.0.stable
|
|
wget https://github.com/godotengine/godot/releases/download/4.3-stable/Godot_v4.3-stable_export_templates.tpz
|
|
unzip Godot_v4.3-stable_export_templates.tpz -d ~/.local/share/godot/export_templates/4.3.0.stable
|
|
|
|
- name: Export Windows Build
|
|
run: |
|
|
mkdir -p build
|
|
godot --headless --export-release "Windows Desktop" build/tekton_armageddon_windows.exe
|
|
|
|
- name: Upload Windows Artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: windows-build
|
|
path: build/tekton_armageddon_windows.exe
|
|
retention-days: 30
|
|
|
|
build-android:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
|
|
steps:
|
|
- name: Checkout Source Code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Godot
|
|
uses: chickensoft-games/setup-godot@v1
|
|
with:
|
|
version: '4.3.0'
|
|
use-dotnet: false
|
|
|
|
- name: Setup Export Templates
|
|
run: |
|
|
mkdir -p ~/.local/share/godot/export_templates/4.3.0.stable
|
|
wget https://github.com/godotengine/godot/releases/download/4.3-stable/Godot_v4.3-stable_export_templates.tpz
|
|
unzip Godot_v4.3-stable_export_templates.tpz -d ~/.local/share/godot/export_templates/4.3.0.stable
|
|
|
|
- name: Setup Android SDK
|
|
uses: android-actions/setup-android@v3
|
|
|
|
- name: Export Android Build
|
|
run: |
|
|
mkdir -p build
|
|
godot --headless --export-release "Android" build/tekton_armageddon_android.apk
|
|
|
|
- name: Upload Android Artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: android-build
|
|
path: build/tekton_armageddon_android.apk
|
|
retention-days: 30
|
|
|
|
build-macos:
|
|
runs-on: macos-latest
|
|
permissions:
|
|
contents: write
|
|
|
|
steps:
|
|
- name: Checkout Source Code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Godot
|
|
uses: chickensoft-games/setup-godot@v1
|
|
with:
|
|
version: '4.3.0'
|
|
use-dotnet: false
|
|
|
|
- name: Setup Export Templates
|
|
run: |
|
|
mkdir -p ~/Library/Application\ Support/Godot/export_templates/4.3.0.stable
|
|
wget https://github.com/godotengine/godot/releases/download/4.3-stable/Godot_v4.3-stable_export_templates.tpz
|
|
unzip Godot_v4.3-stable_export_templates.tpz -d ~/Library/Application\ Support/Godot/export_templates/4.3.0.stable
|
|
|
|
- name: Export macOS Build
|
|
run: |
|
|
mkdir -p build
|
|
godot --headless --export-release "macOS" build/tekton_armageddon_macos.zip
|
|
|
|
- name: Upload macOS Artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: macos-build
|
|
path: build/tekton_armageddon_macos.zip
|
|
retention-days: 30
|
|
|
|
create-release:
|
|
needs: [build-windows, build-android, build-macos]
|
|
runs-on: ubuntu-latest
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
permissions:
|
|
contents: write
|
|
|
|
steps:
|
|
- name: Download All Artifacts
|
|
uses: actions/download-artifact@v4
|
|
|
|
- name: Create GitHub Release
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
files: |
|
|
windows-build/tekton_armageddon_windows.exe
|
|
android-build/tekton_armageddon_android.apk
|
|
macos-build/tekton_armageddon_macos.zip
|
|
draft: false
|
|
prerelease: false
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|