Compare commits
38 Commits
0.0.1
...
9ab87cc2da
| Author | SHA1 | Date | |
|---|---|---|---|
| 9ab87cc2da | |||
| 36ca9ba5ea | |||
| 172fc7669b | |||
| 0a92f7b461 | |||
| d03874f5e7 | |||
| 987e4300ab | |||
| 991f9f4bec | |||
| 5c35a1beed | |||
| 86274ab1bf | |||
| 248496db91 | |||
| 926a1e8aa0 | |||
| 71e37b0b55 | |||
| 81dca211b5 | |||
| f16838c81c | |||
| 0d14d27a0b | |||
| 3c619c9613 | |||
| fd52dc9c1c | |||
| 40d8d8753d | |||
| 051c822bd5 | |||
| 3ab31fe40b | |||
| 376c1b5225 | |||
| 03787a82fc | |||
| bc9f0b9f27 | |||
| 1aa0dbf544 | |||
| ebe34e1750 | |||
| c9743d65b7 | |||
| 70c407b5f9 | |||
| aa6ac812cf | |||
| a34ca8af46 | |||
| 72601467e4 | |||
| 7d9d107d65 | |||
| ef8e3d7d15 | |||
| c287fd8404 | |||
| 2c3b9e458d | |||
| 9322a8f723 | |||
| 191f94892b | |||
| 7dfdd4c2c8 | |||
| fbfa81b9aa |
@@ -6,23 +6,160 @@ on:
|
||||
pull_request:
|
||||
branches: [release]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
preset: ["Windows", "Linux/X11", "Web"]
|
||||
env:
|
||||
GODOT_VERSION: 4.6.1
|
||||
EXPORT_NAME: Experements
|
||||
PROJECT_PATH: .
|
||||
BLENDER_VERSION: 5.0.0
|
||||
|
||||
jobs:
|
||||
export-windows:
|
||||
name: Windows Export
|
||||
runs-on: ubuntu-24.04 # Use 24.04 with godot 4
|
||||
container: barichello/godot-ci:4.6
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- name: Update and install dependencies
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y curl gnupg
|
||||
apt-get install -y blender
|
||||
|
||||
- name: Install Node.js
|
||||
run: |
|
||||
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
|
||||
apt-get install -y nodejs
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
lfs: true
|
||||
|
||||
- name: Setup
|
||||
shell: bash
|
||||
run: |
|
||||
set -Eeuo pipefail
|
||||
BLENDER_PATH="/usr/bin/blender"
|
||||
mkdir -pv ~/.config/godot
|
||||
mkdir -pv ~/.local/share/godot/export_templates/
|
||||
GODOT_CFG="$(find ~/.config/godot -name "editor_settings-*.tres" | head -n 1 || true)"
|
||||
|
||||
if [ -z "$GODOT_CFG" ]; then
|
||||
echo "# Missing Godot editor settings" > "$GODOT_CFG"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Set the Blender path
|
||||
if [ -n "${BLENDER_PATH:-}" ]; then
|
||||
if grep -q '^filesystem/import/blender/blender_path' "$GODOT_CFG"; then
|
||||
# Replace existing path
|
||||
sed -i "s|^filesystem/import/blender/blender_path = .*|filesystem/import/blender/blender_path = \"$BLENDER_PATH\"|" "$GODOT_CFG"
|
||||
else
|
||||
# Append new path
|
||||
echo "filesystem/import/blender/blender_path = \"$BLENDER_PATH\"" >> "$GODOT_CFG"
|
||||
fi
|
||||
fi
|
||||
echo "Blender path configured in $GODOT_CFG"
|
||||
|
||||
- name: Windows Build
|
||||
shell: bash
|
||||
run: |
|
||||
set -Eeuo pipefail
|
||||
mkdir -v -p build/windows
|
||||
EXPORT_DIR="$(readlink -f build)"
|
||||
cd $PROJECT_PATH
|
||||
godot --headless --export-release "Windows" "$EXPORT_DIR/windows/$EXPORT_NAME.exe"
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: windows
|
||||
path: build/windows
|
||||
|
||||
export-linux:
|
||||
name: Linux Export
|
||||
runs-on: ubuntu-24.04 # Use 24.04 with godot 4
|
||||
container: barichello/godot-ci:4.6
|
||||
steps:
|
||||
- name: Update and install dependencies
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y curl gnupg
|
||||
|
||||
- name: Install Node.js
|
||||
run: |
|
||||
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
|
||||
apt-get install -y nodejs
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
lfs: true
|
||||
- name: Setup
|
||||
shell: bash
|
||||
run: |
|
||||
set -Eeuo pipefail
|
||||
BLENDER_PATH="/usr/bin/blender"
|
||||
mkdir -pv ~/.config/godot
|
||||
mkdir -pv ~/.local/share/godot/export_templates/
|
||||
GODOT_CFG="$(find ~/.config/godot -name "editor_settings-*.tres" | head -n 1 || true)"
|
||||
|
||||
if [ -z "$GODOT_CFG" ]; then
|
||||
echo "# Missing Godot editor settings" > "$GODOT_CFG"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Set the Blender path
|
||||
if [ -n "${BLENDER_PATH:-}" ]; then
|
||||
if grep -q '^filesystem/import/blender/blender_path' "$GODOT_CFG"; then
|
||||
# Replace existing path
|
||||
sed -i "s|^filesystem/import/blender/blender_path = .*|filesystem/import/blender/blender_path = \"$BLENDER_PATH\"|" "$GODOT_CFG"
|
||||
else
|
||||
# Append new path
|
||||
echo "filesystem/import/blender/blender_path = \"$BLENDER_PATH\"" >> "$GODOT_CFG"
|
||||
fi
|
||||
fi
|
||||
echo "Blender path configured in $GODOT_CFG"
|
||||
|
||||
- name: Linux Build
|
||||
shell: bash
|
||||
run: |
|
||||
set -Eeuo pipefail
|
||||
mkdir -v -p build/linux
|
||||
EXPORT_DIR="$(readlink -f build)"
|
||||
cd $PROJECT_PATH
|
||||
godot --headless --export-release "Linux/X11" "$EXPORT_DIR/linux/$EXPORT_NAME.x86_64"
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: linux
|
||||
path: build/linux
|
||||
|
||||
create-release:
|
||||
name: Create Release
|
||||
runs-on: ubuntu-latest
|
||||
needs: [export-linux, export-windows]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Download Windows Artifact
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: windows
|
||||
path: build/windows
|
||||
|
||||
- name: Download Linux Artifact
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: linux
|
||||
path: build/linux
|
||||
|
||||
- name: Extract version and body from CHANGELOG
|
||||
id: changelog
|
||||
run: |
|
||||
# Extract the latest released version (skip Unreleased)
|
||||
LATEST=$(grep -E '^## \[[0-9]+\.[0-9]+\.[0-9]+\]' CHANGELOG.md | head -n1 | sed -E 's/^## \[([0-9]+\.[0-9]+\.[0-9]+)\].*/\1/')
|
||||
|
||||
|
||||
if [ -z "$LATEST" ]; then
|
||||
echo "No released version found in CHANGELOG.md"
|
||||
exit 1
|
||||
@@ -46,39 +183,20 @@ jobs:
|
||||
echo "$BODY" >> $GITHUB_OUTPUT
|
||||
echo "EOF" >> $GITHUB_OUTPUT
|
||||
|
||||
# Create Release also creates an Tag
|
||||
# - name: Create git tag
|
||||
# uses: alazhar/gitea-action-autotag@v1
|
||||
# with:
|
||||
# tag: ${{ steps.changelog.outputs.version }}
|
||||
|
||||
- name: Build
|
||||
id: build
|
||||
uses: mlm-games/godot-build-action@v1.3.1
|
||||
with:
|
||||
EXPORT_PRESET_NAME: ${{ matrix.preset }}
|
||||
INSTALL_BLENDER: "true"
|
||||
BLENDER_VERSION: "5.0.0"
|
||||
VERBOSE_IMPORT: "false"
|
||||
|
||||
- name: Normalize build path
|
||||
id: normalize
|
||||
run: echo "path=$(realpath ${{ steps.build.outputs.build }})" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Upload builds
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: godot-${{ matrix.preset }}-v${{ steps.changelog.outputs.version }}
|
||||
path: ${{ steps.normalize.outputs.path }}
|
||||
- name: Zipping exports
|
||||
run: |
|
||||
zip -r windows-${{ steps.changelog.outputs.version }}.zip build/windows
|
||||
zip -r linux-${{ steps.changelog.outputs.version }}.zip build/linux
|
||||
|
||||
- name: Create Release
|
||||
uses: akkuman/gitea-release-action@v1
|
||||
with:
|
||||
server_url: ${{ vars.SERVER_URL }}
|
||||
tag_name: "${{ steps.changelog.outputs.version }}"
|
||||
name: Release ${{ steps.changelog.outputs.version }}
|
||||
body: ${{ steps.changelog.outputs.description }}
|
||||
files: |
|
||||
godot-${{ matrix.preset }}-v${{ steps.changelog.outputs.version }}
|
||||
draft: false
|
||||
server_url: ${{ vars.SERVER_URL }}
|
||||
tag_name: ${{ steps.changelog.outputs.version }}
|
||||
name: "${{ steps.changelog.outputs.version }}"
|
||||
body: ${{ steps.changelog.outputs.body }}
|
||||
draft: false
|
||||
token: ${{ secrets.GITEA_TOKEN }}
|
||||
files: |
|
||||
windows-${{ steps.changelog.outputs.version }}.zip
|
||||
linux-${{ steps.changelog.outputs.version }}.zip
|
||||
|
||||
1
Games/SpaceResources/Assets/TheMoon/TheMoon.gd
Normal file
1
Games/SpaceResources/Assets/TheMoon/TheMoon.gd
Normal file
@@ -0,0 +1 @@
|
||||
extends Node2D
|
||||
1
Games/SpaceResources/Assets/TheMoon/TheMoon.gd.uid
Normal file
1
Games/SpaceResources/Assets/TheMoon/TheMoon.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://1c5nfdg2aud4
|
||||
37
Games/SpaceResources/Assets/TheMoon/TheMoon.tscn
Normal file
37
Games/SpaceResources/Assets/TheMoon/TheMoon.tscn
Normal file
@@ -0,0 +1,37 @@
|
||||
[gd_scene format=3 uid="uid://o2egm85y3wul"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://1c5nfdg2aud4" path="res://Games/SpaceResources/Assets/TheMoon/TheMoon.gd" id="1_sr6fy"]
|
||||
[ext_resource type="Texture2D" uid="uid://dng410xo7qqfv" path="res://Assets/PixelPlanets/a-moon.png" id="2_oy8k5"]
|
||||
|
||||
[node name="TheMoon" type="Node2D" unique_id=1994078602]
|
||||
script = ExtResource("1_sr6fy")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=1777467462]
|
||||
texture_filter = 1
|
||||
texture_repeat = 1
|
||||
texture = ExtResource("2_oy8k5")
|
||||
|
||||
[node name="Control" type="Control" parent="." unique_id=1752474701]
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
offset_left = 20.0
|
||||
offset_top = 20.0
|
||||
offset_right = 20.0
|
||||
offset_bottom = 20.0
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="Control" unique_id=61689214]
|
||||
layout_mode = 0
|
||||
offset_right = 110.0
|
||||
offset_bottom = 77.0
|
||||
|
||||
[node name="Label" type="Label" parent="Control/VBoxContainer" unique_id=1786036540]
|
||||
layout_mode = 2
|
||||
text = "Iron"
|
||||
|
||||
[node name="Label2" type="Label" parent="Control/VBoxContainer" unique_id=374559952]
|
||||
layout_mode = 2
|
||||
text = "Copper"
|
||||
|
||||
[node name="Label3" type="Label" parent="Control/VBoxContainer" unique_id=1739358724]
|
||||
layout_mode = 2
|
||||
text = "Copper"
|
||||
12
Games/SpaceResources/UI/UI.tscn
Normal file
12
Games/SpaceResources/UI/UI.tscn
Normal file
@@ -0,0 +1,12 @@
|
||||
[gd_scene format=3 uid="uid://cbqapc1frbhtv"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dslwh6krdrhb" path="res://Games/SpaceResources/UI/ui.gd" id="1_0oc4u"]
|
||||
|
||||
[node name="Ui" type="Control" unique_id=1649292342]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_0oc4u")
|
||||
1
Games/SpaceResources/UI/ui.gd
Normal file
1
Games/SpaceResources/UI/ui.gd
Normal file
@@ -0,0 +1 @@
|
||||
extends Control
|
||||
1
Games/SpaceResources/UI/ui.gd.uid
Normal file
1
Games/SpaceResources/UI/ui.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://dslwh6krdrhb
|
||||
@@ -1,7 +1,8 @@
|
||||
[gd_scene format=3 uid="uid://cycayd4l7k7s4"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bqslv86lm78ci" path="res://Games/SpaceResources/Scripts/RecurionCamera.gd" id="1_002bs"]
|
||||
[ext_resource type="Texture2D" uid="uid://dng410xo7qqfv" path="res://Assets/PixelPlanets/a-moon.png" id="2_qgdyp"]
|
||||
[ext_resource type="PackedScene" uid="uid://cbqapc1frbhtv" path="res://Games/SpaceResources/UI/UI.tscn" id="2_qgdyp"]
|
||||
[ext_resource type="PackedScene" uid="uid://o2egm85y3wul" path="res://Games/SpaceResources/Assets/TheMoon/TheMoon.tscn" id="3_yu4li"]
|
||||
|
||||
[node name="Recuration" type="Node2D" unique_id=1741828961]
|
||||
|
||||
@@ -10,7 +11,7 @@ script = ExtResource("1_002bs")
|
||||
movement_speed = 10.0
|
||||
metadata/_custom_type_script = "uid://bqslv86lm78ci"
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=45756830]
|
||||
texture_filter = 1
|
||||
texture_repeat = 1
|
||||
texture = ExtResource("2_qgdyp")
|
||||
[node name="Ui" parent="RecurionCamera" unique_id=1649292342 instance=ExtResource("2_qgdyp")]
|
||||
|
||||
[node name="TheMoon" parent="." unique_id=1994078602 instance=ExtResource("3_yu4li")]
|
||||
position = Vector2(-181, -79)
|
||||
|
||||
Reference in New Issue
Block a user