Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2d8645172b | |||
| b38c73c511 |
@@ -0,0 +1,154 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Build & Release
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.TEKTON_RELEASE_TOKEN }}
|
||||
TAG_NAME: ${{ github.ref_name }}
|
||||
steps:
|
||||
- name: Install tools
|
||||
run: apt-get update -qq && apt-get install -y -qq curl unzip zip
|
||||
|
||||
- name: Checkout Code
|
||||
run: |
|
||||
git config --global credential.helper store
|
||||
echo "https://god:${{ secrets.TEKTON_RELEASE_TOKEN }}@git.klud.top" > ~/.git-credentials
|
||||
git clone https://git.klud.top/danchie/tekton.git .
|
||||
git checkout $TAG_NAME
|
||||
|
||||
- name: Setup Godot (Cached)
|
||||
run: |
|
||||
apt-get update -qq && apt-get install -y -qq unzip curl
|
||||
if [ ! -f /cache/godot_4.6.3 ]; then
|
||||
echo "Downloading Godot 4.6.3..."
|
||||
curl -sL -o /tmp/godot.zip "https://github.com/godotengine/godot-builds/releases/download/4.6.3-stable/Godot_v4.6.3-stable_linux.x86_64.zip"
|
||||
unzip -q -o /tmp/godot.zip -d /cache/
|
||||
mv /cache/Godot_v4.6.3-stable_linux.x86_64 /cache/godot_4.6.3
|
||||
fi
|
||||
cp /cache/godot_4.6.3 /usr/local/bin/godot
|
||||
chmod +x /usr/local/bin/godot
|
||||
mkdir -p ~/.local/share/godot/export_templates/4.6.3.stable
|
||||
if [ ! -f /cache/Godot_v4.6.3-stable_export_templates.tpz ]; then
|
||||
echo "Downloading templates..."
|
||||
curl -sL -o /cache/Godot_v4.6.3-stable_export_templates.tpz \
|
||||
"https://github.com/godotengine/godot-builds/releases/download/4.6.3-stable/Godot_v4.6.3-stable_export_templates.tpz"
|
||||
fi
|
||||
cd ~/.local/share/godot/export_templates/4.6.3.stable
|
||||
unzip -q -o /cache/Godot_v4.6.3-stable_export_templates.tpz
|
||||
mv templates/* .
|
||||
rm -rf templates
|
||||
cd $GITHUB_WORKSPACE
|
||||
mkdir -p build
|
||||
|
||||
- name: Export Windows
|
||||
run: |
|
||||
mkdir -p build/windows
|
||||
cp addons/godotsteam/libgodotsteam* build/windows/ 2>/dev/null || true
|
||||
godot --headless --export-release "Windows Desktop" build/windows/tekton_armageddon_windows.exe || true
|
||||
cd build/windows && zip -r ../tekton_armageddon_windows_${TAG_NAME}.zip .
|
||||
|
||||
- name: Export Linux
|
||||
run: |
|
||||
mkdir -p build/linux
|
||||
godot --headless --export-release "Linux/X11" build/linux/tekton_armageddon_linux.x86_64 || true
|
||||
cd build/linux && zip -r ../tekton_armageddon_linux_${TAG_NAME}.zip .
|
||||
|
||||
- name: Export macOS
|
||||
run: |
|
||||
mkdir -p build/macos
|
||||
godot --headless --export-release "macOS" build/macos/tekton_armageddon_macos.zip 2>&1 | tail -5 || true
|
||||
if [ -f build/macos/tekton_armageddon_macos.zip ]; then
|
||||
mv build/macos/tekton_armageddon_macos.zip build/tekton_armageddon_macos_${TAG_NAME}.zip
|
||||
fi
|
||||
|
||||
- name: Extract changelog
|
||||
run: |
|
||||
# Extract changelog for this tag version from CHANGELOG_DRAFT.md
|
||||
V="${TAG_NAME#v}"
|
||||
BODY=$(awk -v ver="[$V]" '
|
||||
/^## / { if (found) exit }
|
||||
/^## / && index($0, ver) { found=1; next }
|
||||
found { print }
|
||||
' CHANGELOG_DRAFT.md | sed 's/^ *//')
|
||||
echo "CHANGELOG_BODY<<EOF" >> $GITHUB_ENV
|
||||
echo "$BODY" >> $GITHUB_ENV
|
||||
echo "EOF" >> $GITHUB_ENV
|
||||
|
||||
- name: Create Gitea Release
|
||||
run: |
|
||||
set -e
|
||||
API="https://git.klud.top/api/v1/repos/danchie/tekton/releases"
|
||||
TAG="$TAG_NAME"
|
||||
echo "Checking existing release for $TAG..."
|
||||
RELEASE_JSON=$(curl -s -H "Authorization: token $GITEA_TOKEN" "$API/tags/$TAG" 2>/dev/null || echo "")
|
||||
RELEASE_ID=$(echo "$RELEASE_JSON" | grep -o '"id":[0-9]*' | head -1 | grep -o '[0-9]*' || true)
|
||||
if [ -z "$RELEASE_ID" ]; then
|
||||
echo "Creating new release for $TAG..."
|
||||
# Escape body for JSON
|
||||
BODY_ESCAPED=$(echo "$CHANGELOG_BODY" | python3 -c "import json,sys; print(json.dumps(sys.stdin.read().strip()))" 2>/dev/null || echo '""')
|
||||
RELEASE_JSON=$(curl -s -X POST \
|
||||
-H "Authorization: token $GITEA_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{\"tag_name\":\"$TAG\",\"name\":\"$TAG\",\"body\":$BODY_ESCAPED,\"draft\":true}" \
|
||||
"$API")
|
||||
echo "API response: $RELEASE_JSON"
|
||||
RELEASE_ID=$(echo "$RELEASE_JSON" | grep -o '"id":[0-9]*' | head -1 | grep -o '[0-9]*')
|
||||
if [ -z "$RELEASE_ID" ]; then
|
||||
echo "FATAL: Could not create release"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
echo "release_id=$RELEASE_ID"
|
||||
echo "$RELEASE_ID" > /tmp/release_id.txt
|
||||
|
||||
- name: Upload Windows asset
|
||||
run: |
|
||||
RELEASE_ID=$(cat /tmp/release_id.txt)
|
||||
curl -s -X POST \
|
||||
-H "Authorization: token $GITEA_TOKEN" \
|
||||
-H "Content-Type: multipart/form-data" \
|
||||
-F "attachment=@build/tekton_armageddon_windows_${TAG_NAME}.zip" \
|
||||
"https://git.klud.top/api/v1/repos/danchie/tekton/releases/$RELEASE_ID/assets"
|
||||
echo "Windows uploaded"
|
||||
|
||||
- name: Upload Linux asset
|
||||
run: |
|
||||
RELEASE_ID=$(cat /tmp/release_id.txt)
|
||||
curl -s -X POST \
|
||||
-H "Authorization: token $GITEA_TOKEN" \
|
||||
-H "Content-Type: multipart/form-data" \
|
||||
-F "attachment=@build/tekton_armageddon_linux_${TAG_NAME}.zip" \
|
||||
"https://git.klud.top/api/v1/repos/danchie/tekton/releases/$RELEASE_ID/assets"
|
||||
echo "Linux uploaded"
|
||||
|
||||
- name: Upload macOS asset
|
||||
run: |
|
||||
RELEASE_ID=$(cat /tmp/release_id.txt)
|
||||
if [ -f "build/tekton_armageddon_macos_${TAG_NAME}.zip" ]; then
|
||||
curl -s -X POST \
|
||||
-H "Authorization: token $GITEA_TOKEN" \
|
||||
-H "Content-Type: multipart/form-data" \
|
||||
-F "attachment=@build/tekton_armageddon_macos_${TAG_NAME}.zip" \
|
||||
"https://git.klud.top/api/v1/repos/danchie/tekton/releases/$RELEASE_ID/assets"
|
||||
echo "macOS uploaded"
|
||||
else
|
||||
echo "macOS asset not built, skipping"
|
||||
fi
|
||||
|
||||
- name: Publish release
|
||||
run: |
|
||||
RELEASE_ID=$(cat /tmp/release_id.txt)
|
||||
curl -s -X PATCH \
|
||||
-H "Authorization: token $GITEA_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"draft":false}' \
|
||||
"https://git.klud.top/api/v1/repos/danchie/tekton/releases/$RELEASE_ID"
|
||||
echo "Published: https://git.klud.top/danchie/tekton/releases/tag/$TAG_NAME"
|
||||
@@ -0,0 +1,68 @@
|
||||
name: Deploy Patch
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: "Patch version (e.g., 2.4.4)"
|
||||
required: true
|
||||
type: string
|
||||
notes:
|
||||
description: "Release notes"
|
||||
required: false
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
name: Build & Deploy Patch
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Checkout repository (shallow)
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.TEKTON_RELEASE_TOKEN }}
|
||||
run: |
|
||||
git clone --depth 1 https://god:$GITEA_TOKEN@git.klud.top/danchie/tekton.git .
|
||||
git config user.name "god"
|
||||
git config user.email "god@noreply.git.klud.top"
|
||||
|
||||
- name: Setup Godot (Cached)
|
||||
run: |
|
||||
if [ ! -f /cache/godot_4.6.3 ]; then
|
||||
echo "Downloading Godot 4.6.3..."
|
||||
apt-get update -qq && apt-get install -y -qq unzip curl
|
||||
curl -sL -o /tmp/godot.zip "https://github.com/godotengine/godot-builds/releases/download/4.6.3-stable/Godot_v4.6.3-stable_linux.x86_64.zip"
|
||||
unzip -q -o /tmp/godot.zip -d /cache/
|
||||
mv /cache/Godot_v4.6.3-stable_linux.x86_64 /cache/godot_4.6.3
|
||||
fi
|
||||
cp /cache/godot_4.6.3 /usr/local/bin/godot
|
||||
chmod +x /usr/local/bin/godot
|
||||
mkdir -p build
|
||||
|
||||
- name: Generate version.json & bump version
|
||||
env:
|
||||
PATCH_VERSION: ${{ github.event.inputs.version }}
|
||||
PATCH_NOTES: ${{ github.event.inputs.notes }}
|
||||
run: |
|
||||
python3 tools/generate_version_json.py --skip-changelog
|
||||
|
||||
- name: Export patch PCK
|
||||
run: |
|
||||
godot --headless --export-pack "Windows Desktop" build/patch.pck 2>&1 | tail -5
|
||||
|
||||
- name: Push to patches branch
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.TEKTON_RELEASE_TOKEN }}
|
||||
run: |
|
||||
mkdir -p patch-deploy
|
||||
cp build/patch.pck patch-deploy/
|
||||
cp assets/data/version.json patch-deploy/
|
||||
cd patch-deploy
|
||||
git init
|
||||
git config user.name "god"
|
||||
git config user.email "god@noreply.git.klud.top"
|
||||
git remote add origin https://god:$GITEA_TOKEN@git.klud.top/danchie/tekton.git
|
||||
git checkout -b patches
|
||||
git add .
|
||||
git commit -m "patch ${{ github.event.inputs.version }}"
|
||||
git push -f origin patches
|
||||
@@ -1,81 +0,0 @@
|
||||
name: Build and Release Patch PCK
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'patch-release'
|
||||
paths:
|
||||
- 'scripts/**'
|
||||
- 'scenes/**'
|
||||
- 'assets/**'
|
||||
- 'CHANGELOG_DRAFT.md'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-and-deploy-patch:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Checkout Source Code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# ── 1. Auto-generate version.json from CHANGELOG_DRAFT.md ────────────
|
||||
- name: Generate Version JSON & Bump Version
|
||||
run: python3 tools/generate_version_json.py
|
||||
|
||||
# ── 2. Commit bumped files back to the repo ───────────────────────────
|
||||
- name: Commit Version Bump
|
||||
run: |
|
||||
git config user.name "PatchBot"
|
||||
git config user.email "action@github.com"
|
||||
git add assets/data/version.json project.godot CHANGELOG_DRAFT.md
|
||||
git diff --staged --quiet || git commit -m "[AUTO] Version bump & changelog update"
|
||||
git push
|
||||
|
||||
# ── 3. Detect changed files for patch PCK ────────────────────────────
|
||||
- name: Generate Changed Files List
|
||||
run: |
|
||||
git diff --name-only HEAD^ HEAD -- 'scripts/**' 'scenes/**' 'assets/**' > changed_files.txt
|
||||
echo "Files to patch:"
|
||||
cat changed_files.txt
|
||||
|
||||
# ── 4. Build patch.pck ────────────────────────────────────────────────
|
||||
- name: Setup Godot
|
||||
uses: chickensoft-games/setup-godot@v1
|
||||
with:
|
||||
version: '4.3.0'
|
||||
use-dotnet: false
|
||||
|
||||
- name: Run Build Patch Script
|
||||
run: godot --headless -s tools/build_patch.gd
|
||||
|
||||
# ── 5. Push patch.pck to public repo ─────────────────────────────────
|
||||
- name: Push patch.pck to Public Repository
|
||||
uses: dmnemec/copy_file_to_another_repo_action@main
|
||||
env:
|
||||
API_TOKEN_GITHUB: ${{ secrets.PUBLIC_REPO_PAT }}
|
||||
with:
|
||||
source_file: 'patch.pck'
|
||||
destination_repo: '${{ github.actor }}/tekton-updates'
|
||||
destination_folder: 'latest'
|
||||
user_email: 'action@github.com'
|
||||
user_name: 'PatchBot'
|
||||
commit_message: '[AUTO] Pushed new patch.pck'
|
||||
|
||||
# ── 6. Push version.json to public repo ──────────────────────────────
|
||||
- name: Push version.json to Public Repository
|
||||
uses: dmnemec/copy_file_to_another_repo_action@main
|
||||
env:
|
||||
API_TOKEN_GITHUB: ${{ secrets.PUBLIC_REPO_PAT }}
|
||||
with:
|
||||
source_file: 'assets/data/version.json'
|
||||
destination_repo: '${{ github.actor }}/tekton-updates'
|
||||
destination_folder: 'latest'
|
||||
user_email: 'action@github.com'
|
||||
user_name: 'PatchBot'
|
||||
commit_message: '[AUTO] Pushed new version.json'
|
||||
@@ -1,9 +0,0 @@
|
||||
[gd_resource type="StandardMaterial3D" format=3 uid="uid://v1qdug4x2ifm"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://d0egs6j3sg0me" path="res://assets/characters/skins/clothing/oldpop_cloth_white_pant.png" id="1_fw7uu"]
|
||||
|
||||
[resource]
|
||||
transparency = 2
|
||||
alpha_scissor_threshold = 0.5
|
||||
alpha_antialiasing_mode = 0
|
||||
albedo_texture = ExtResource("1_fw7uu")
|
||||
@@ -1,7 +1,3 @@
|
||||
[gd_resource type="StandardMaterial3D" format=3 uid="uid://deufkavgeo0jg"]
|
||||
|
||||
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_ywepx"]
|
||||
load_path = "res://.godot/imported/4e3103ab214e443c83147afcd786aa6e_RGB_M_Buche_albedo.jpeg-69394e445366683380463d4afc846305.s3tc.ctex"
|
||||
|
||||
[resource]
|
||||
albedo_texture = SubResource("CompressedTexture2D_ywepx")
|
||||
|
||||
@@ -9,4 +9,4 @@ Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.500000
|
||||
d 1.000000
|
||||
illum 2
|
||||
map_Kd C:/Users/beng/Downloads/3d_Ripper_Pro_v103/Downloads/SarahMyriamMadi/01- Handpainted.Log/4e3103ab214e443c83147afcd786aa6e_RGB_M_Buche_albedo.jpeg
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ services:
|
||||
|
||||
nakama:
|
||||
container_name: nakama
|
||||
image: heroiclabs/nakama:3.24.2
|
||||
image: heroiclabs/nakama:latest
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user