8 Commits

Author SHA1 Message Date
adtpdn 6971c27d77 ci: use GITEA_TOKEN env var, skip macOS upload if missing
Release / Build & Release (push) Successful in 24m57s
2026-07-04 01:59:48 +08:00
adtpdn 7e6e0f7bef ci: guard macOS mv if export fails
Release / Build & Release (push) Failing after 5m45s
2026-07-04 01:48:36 +08:00
adtpdn 869f670605 ci: macOS export can fail, allow continue
Release / Build & Release (push) Failing after 5m12s
2026-07-04 01:42:33 +08:00
adtpdn db061a7946 ci: fix second ref to .official dir
Release / Build & Release (push) Failing after 5m14s
2026-07-04 01:34:28 +08:00
adtpdn 20cd2d08b8 ci: fix export templates path 4.6.stable not .official
Release / Build & Release (push) Failing after 2m52s
2026-07-04 01:28:24 +08:00
adtpdn 1652630153 ci: update URLs from local to VPS
Release / Build & Release (push) Failing after 4m3s
2026-07-04 01:13:17 +08:00
adtpdn 34039db92c chore(ci): use HTTP manual clone with Gitea internal Docker network IP, ditch ssh
Release / Build & Release (push) Failing after 2m20s
2026-07-03 18:26:11 +08:00
adtpdn bf9ae51702 chore(ci): use explicit ip for gitea in ssh config
Release / Build & Release (push) Failing after 2m26s
2026-07-03 18:21:13 +08:00
+25 -49
View File
@@ -14,44 +14,19 @@ jobs:
GITEA_TOKEN: ${{ secrets.TEKTON_RELEASE_TOKEN }} GITEA_TOKEN: ${{ secrets.TEKTON_RELEASE_TOKEN }}
TAG_NAME: ${{ github.ref_name }} TAG_NAME: ${{ github.ref_name }}
steps: steps:
- name: Setup SSH
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.TEKTON_SSH_KEY }}
- name: Install tools - name: Install tools
run: apt-get update -qq && apt-get install -y -qq curl unzip run: apt-get update -qq && apt-get install -y -qq curl unzip
- name: Add Gitea SSH Host Key
run: |
mkdir -p ~/.ssh
ssh-keyscan -p 22 gitea >> ~/.ssh/known_hosts || true
# Route all possible hostnames Gitea might hand out via API back to the internal docker port 22
printf "Host gitea\n HostName gitea\n Port 22\n StrictHostKeyChecking no\n" > ~/.ssh/config
printf "Host thunderobot\n HostName gitea\n Port 22\n StrictHostKeyChecking no\n" >> ~/.ssh/config
printf "Host thunderobot.tail5d6e8e.ts.net\n HostName gitea\n Port 22\n StrictHostKeyChecking no\n" >> ~/.ssh/config
# Force checkout to rewrite port 222 down to 22
git config --global url."ssh://git@gitea/".insteadOf "ssh://git@gitea:222/"
git config --global url."ssh://git@gitea/".insteadOf "git@gitea:222:"
git config --global url."ssh://git@thunderobot.tail5d6e8e.ts.net/".insteadOf "ssh://git@thunderobot.tail5d6e8e.ts.net:222/"
git config --global url."ssh://git@thunderobot.tail5d6e8e.ts.net/".insteadOf "git@thunderobot.tail5d6e8e.ts.net:222:"
git config --global url."ssh://git@thunderobot/".insteadOf "ssh://git@thunderobot:222/"
git config --global url."ssh://git@thunderobot/".insteadOf "git@thunderobot:222:"
chmod 600 ~/.ssh/config
- name: Checkout Code - name: Checkout Code
run: | run: |
# Use manual clone because actions/checkout overrides SSH settings and drops our Host aliases git config --global credential.helper store
eval "$(ssh-agent -s)" echo "http://adtpdn:${{ secrets.TEKTON_RELEASE_TOKEN }}@52.74.133.55:3000" > ~/.git-credentials
ssh-add <(echo "${{ secrets.TEKTON_SSH_KEY }}") git clone http://52.74.133.55:3000/danchie/tekton.git .
git clone ssh://git@gitea/danchie/tekton.git .
git checkout $TAG_NAME git checkout $TAG_NAME
- name: Setup Godot (Cached) - name: Setup Godot (Cached)
run: | run: |
apt-get install -y zip apt-get install -y zip
# Use cached godot engine binary
if [ ! -f /cache/godot_4.6 ]; then if [ ! -f /cache/godot_4.6 ]; then
echo "Downloading Godot 4.6..." echo "Downloading Godot 4.6..."
curl -sL -o /tmp/godot.zip "https://github.com/godotengine/godot-builds/releases/download/4.6-stable/Godot_v4.6-stable_linux.x86_64.zip" curl -sL -o /tmp/godot.zip "https://github.com/godotengine/godot-builds/releases/download/4.6-stable/Godot_v4.6-stable_linux.x86_64.zip"
@@ -60,15 +35,13 @@ jobs:
fi fi
cp /cache/godot_4.6 /usr/local/bin/godot cp /cache/godot_4.6 /usr/local/bin/godot
chmod +x /usr/local/bin/godot chmod +x /usr/local/bin/godot
mkdir -p ~/.local/share/godot/export_templates/4.6.stable
# Setup templates
mkdir -p ~/.local/share/godot/export_templates/4.6.stable.official
if [ ! -f /cache/Godot_v4.6-stable_export_templates.tpz ]; then if [ ! -f /cache/Godot_v4.6-stable_export_templates.tpz ]; then
echo "Downloading templates..." echo "Downloading templates..."
curl -sL -o /cache/Godot_v4.6-stable_export_templates.tpz \ curl -sL -o /cache/Godot_v4.6-stable_export_templates.tpz \
"https://github.com/godotengine/godot-builds/releases/download/4.6-stable/Godot_v4.6-stable_export_templates.tpz" "https://github.com/godotengine/godot-builds/releases/download/4.6-stable/Godot_v4.6-stable_export_templates.tpz"
fi fi
cd ~/.local/share/godot/export_templates/4.6.stable.official cd ~/.local/share/godot/export_templates/4.6.stable
unzip -q -o /cache/Godot_v4.6-stable_export_templates.tpz unzip -q -o /cache/Godot_v4.6-stable_export_templates.tpz
mv templates/* . mv templates/* .
rm -rf templates rm -rf templates
@@ -87,23 +60,23 @@ jobs:
mkdir -p build/linux mkdir -p build/linux
godot --headless --export-release "Linux/X11" build/linux/tekton_armageddon_linux.x86_64 || true 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 . cd build/linux && zip -r ../tekton_armageddon_linux_${TAG_NAME}.zip .
- name: Export macOS - name: Export macOS
run: | run: |
mkdir -p build/macos mkdir -p build/macos
godot --headless --export-release "macOS" build/macos/tekton_armageddon_macos.zip 2>&1 | tail -5 godot --headless --export-release "macOS" build/macos/tekton_armageddon_macos.zip 2>&1 | tail -5 || true
mv build/macos/tekton_armageddon_macos.zip build/tekton_armageddon_macos_${TAG_NAME}.zip 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: Create Gitea Release - name: Create Gitea Release
run: | run: |
set -e set -e
API="http://gitea:3000/api/v1/repos/danchie/tekton/releases" API="http://52.74.133.55:3000/api/v1/repos/danchie/tekton/releases"
TAG="$TAG_NAME" TAG="$TAG_NAME"
echo "Checking existing release for $TAG..." echo "Checking existing release for $TAG..."
RELEASE_JSON=$(curl -s -H "Authorization: token $GITEA_TOKEN" "$API/tags/$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) RELEASE_ID=$(echo "$RELEASE_JSON" | grep -o '"id":[0-9]*' | head -1 | grep -o '[0-9]*' || true)
if [ -z "$RELEASE_ID" ]; then if [ -z "$RELEASE_ID" ]; then
echo "Creating new release for $TAG..." echo "Creating new release for $TAG..."
RELEASE_JSON=$(curl -s -X POST \ RELEASE_JSON=$(curl -s -X POST \
@@ -118,7 +91,6 @@ jobs:
exit 1 exit 1
fi fi
fi fi
echo "release_id=$RELEASE_ID" echo "release_id=$RELEASE_ID"
echo "$RELEASE_ID" > /tmp/release_id.txt echo "$RELEASE_ID" > /tmp/release_id.txt
@@ -129,7 +101,7 @@ jobs:
-H "Authorization: token $GITEA_TOKEN" \ -H "Authorization: token $GITEA_TOKEN" \
-H "Content-Type: multipart/form-data" \ -H "Content-Type: multipart/form-data" \
-F "attachment=@build/tekton_armageddon_windows_${TAG_NAME}.zip" \ -F "attachment=@build/tekton_armageddon_windows_${TAG_NAME}.zip" \
"http://gitea:3000/api/v1/repos/danchie/tekton/releases/$RELEASE_ID/assets" "http://52.74.133.55:3000/api/v1/repos/danchie/tekton/releases/$RELEASE_ID/assets"
echo "Windows uploaded" echo "Windows uploaded"
- name: Upload Linux asset - name: Upload Linux asset
@@ -139,18 +111,22 @@ jobs:
-H "Authorization: token $GITEA_TOKEN" \ -H "Authorization: token $GITEA_TOKEN" \
-H "Content-Type: multipart/form-data" \ -H "Content-Type: multipart/form-data" \
-F "attachment=@build/tekton_armageddon_linux_${TAG_NAME}.zip" \ -F "attachment=@build/tekton_armageddon_linux_${TAG_NAME}.zip" \
"http://gitea:3000/api/v1/repos/danchie/tekton/releases/$RELEASE_ID/assets" "http://52.74.133.55:3000/api/v1/repos/danchie/tekton/releases/$RELEASE_ID/assets"
echo "Linux uploaded" echo "Linux uploaded"
- name: Upload macOS asset - name: Upload macOS asset
run: | run: |
RELEASE_ID=$(cat /tmp/release_id.txt) RELEASE_ID=$(cat /tmp/release_id.txt)
curl -s -X POST \ if [ -f "build/tekton_armageddon_macos_${TAG_NAME}.zip" ]; then
-H "Authorization: token $GITEA_TOKEN" \ curl -s -X POST \
-H "Content-Type: multipart/form-data" \ -H "Authorization: token $GITEA_TOKEN" \
-F "attachment=@build/tekton_armageddon_macos_${TAG_NAME}.zip" \ -H "Content-Type: multipart/form-data" \
"http://gitea:3000/api/v1/repos/danchie/tekton/releases/$RELEASE_ID/assets" -F "attachment=@build/tekton_armageddon_macos_${TAG_NAME}.zip" \
echo "macOS uploaded" "http://52.74.133.55:3000/api/v1/repos/danchie/tekton/releases/$RELEASE_ID/assets"
echo "macOS uploaded"
else
echo "macOS asset not built, skipping"
fi
- name: Publish release - name: Publish release
run: | run: |
@@ -159,5 +135,5 @@ jobs:
-H "Authorization: token $GITEA_TOKEN" \ -H "Authorization: token $GITEA_TOKEN" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d '{"draft":false}' \ -d '{"draft":false}' \
"http://gitea:3000/api/v1/repos/danchie/tekton/releases/$RELEASE_ID" "http://52.74.133.55:3000/api/v1/repos/danchie/tekton/releases/$RELEASE_ID"
echo "Published: https://git.klud.top/danchie/tekton/releases/tag/$TAG_NAME" echo "Published: https://git.klud.top/danchie/tekton/releases/tag/$TAG_NAME"