feat: fix the asset broken link, and use the gitea .workflow
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user