Migrate Actions workflows to Gitea

- codeql.yml removed: GitHub-only (uses github/codeql-action/*).
- build.yml + release.yml: runs-on switched to ubuntu-latest (Gitea Cloud
  has no Windows runner). Dalamud staging is now downloaded via curl/unzip
  into $HOME/.xlcore/dalamud/Hooks/dev/, the path the Dalamud SDK 15 uses
  on Linux. Locate-step uses find instead of Get-ChildItem.
- release.yml: softprops/action-gh-release replaced with the Gitea-native
  https://gitea.com/actions/release-action. Auto-injected GITHUB_TOKEN on
  Gitea Actions has Gitea-API scope and is sufficient.
- forge-announce.yml: environment: Webhook removed (Gitea has no
  environments — DISCORD_FORGE_WEBHOOK is a repo-level Actions secret).
  avatar_url and embed url switched from raw.githubusercontent.com /
  github.com to gitea.com.
- release-footer.md: install URL plus the five doc links (README, PRIVACY,
  THIRD_PARTY_NOTICES, SECURITY, SUPPORT) and LICENSE link switched to
  gitea.com/.../src/branch/main/. ChatTwo upstream link stays on GitHub.
This commit is contained in:
2026-05-08 14:06:44 +02:00
parent 12ce015d83
commit 9640d336a6
5 changed files with 50 additions and 133 deletions
+27 -21
View File
@@ -2,15 +2,19 @@ name: Release
# Triggered when a vX.Y.Z tag is pushed. Builds the plugin against the
# current Dalamud staging branch, locates the latest.zip produced by
# DalamudPackager and attaches it to the matching GitHub Release.
# DalamudPackager and attaches it to the matching Gitea Release.
#
# User-controlled inputs touched by this workflow:
# - the tag name (filtered by on.tags = v*, validated again at runtime
# against ^v\d+\.\d+\.\d+$ before being used in any string)
# All other values are either repo-controlled (paths under
# HellionChat/bin/Release derived from Get-ChildItem) or pinned URLs to
# goatcorp / GitHub. Nothing from a webhook event payload (issue/PR
# HellionChat/bin/Release derived from find / Get-ChildItem) or pinned
# URLs to goatcorp / gitea. Nothing from a webhook event payload (issue/PR
# titles, commit messages, etc.) flows into a run-step.
#
# Linux runner: gitea.com Cloud Actions only ships ubuntu-latest. The
# plugin csproj targets net10.0-windows, `dotnet build` cross-compiles on
# Linux when the Dalamud staging assemblies sit under $(HOME)/.xlcore/...
on:
push:
@@ -33,7 +37,7 @@ permissions:
jobs:
release:
name: Build and attach release ZIP
runs-on: windows-latest
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
@@ -52,27 +56,25 @@ jobs:
dotnet-version: 10.0.x
- name: Download Dalamud staging
shell: pwsh
run: |
$hooks = Join-Path $env:APPDATA "XIVLauncher\addon\Hooks\dev"
New-Item -ItemType Directory -Force -Path $hooks | Out-Null
Invoke-WebRequest -Uri https://goatcorp.github.io/dalamud-distrib/stg/latest.zip -OutFile dalamud.zip
Expand-Archive -Force -Path dalamud.zip -DestinationPath $hooks
hooks="$HOME/.xlcore/dalamud/Hooks/dev"
mkdir -p "$hooks"
curl -fsSL https://goatcorp.github.io/dalamud-distrib/stg/latest.zip -o dalamud.zip
unzip -oq dalamud.zip -d "$hooks"
- name: Build (Release)
run: dotnet build HellionChat/HellionChat.csproj --configuration Release
- name: Locate latest.zip
id: locate
shell: pwsh
run: |
$zip = Get-ChildItem -Path HellionChat\bin\Release -Recurse -Filter latest.zip | Select-Object -First 1
if (-not $zip)
{
throw "latest.zip not found under HellionChat\bin\Release"
}
Write-Host "Found: $($zip.FullName)"
"path=$($zip.FullName)" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
zip="$(find HellionChat/bin/Release -name latest.zip -print -quit)"
if [ -z "$zip" ]; then
echo "latest.zip not found under HellionChat/bin/Release" >&2
exit 1
fi
echo "Found: $zip"
echo "path=$zip" >> "$GITHUB_OUTPUT"
# Build a release body from the matching changelog block in
# HellionChat.yaml plus a static install / docs footer. Fails the
@@ -150,8 +152,13 @@ jobs:
Write-Host $body
Write-Host "----------------------------------------"
- name: Attach to GitHub release
uses: softprops/action-gh-release@v3
# Gitea-native release action. Creates the release if the tag has no
# release yet, or updates the existing one. body_path provides the
# generated release body, files attaches latest.zip. The auto-injected
# GITHUB_TOKEN on Gitea Actions has Gitea-API scope and is sufficient
# for release write.
- name: Attach to Gitea release
uses: https://gitea.com/actions/release-action@main
with:
# Explicit tag_name so the action targets the correct release in
# both push:tags (auto) and workflow_dispatch (manual recovery)
@@ -160,5 +167,4 @@ jobs:
tag_name: ${{ github.event.inputs.tag || github.ref_name }}
files: ${{ steps.locate.outputs.path }}
body_path: release-body.md
fail_on_unmatched_files: true
generate_release_notes: false
api_key: ${{ secrets.GITHUB_TOKEN }}