Initial template setup
CI / build (push) Failing after 34s

This commit is contained in:
2026-05-09 16:41:15 +02:00
commit 4a2e840888
20 changed files with 561 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
- name: Restore
run: dotnet restore
- name: Build (Release)
run: dotnet build -c Release --no-restore
- name: Verify Dalamud manifest exists
run: test -f bin/Release/PluginNameTemplate/PluginNameTemplate.json
+75
View File
@@ -0,0 +1,75 @@
# Forge-Auto-Announce
# Triggers on tag push (v*). Reads .gitea/forge-posts/v<X.Y.Z>.md from the
# *tagged tree* (not main), assembles a Discord embed, posts via webhook.
#
# Required repo secret: FORGE_DISCORD_WEBHOOK_URL
# Optional repo secret: FORGE_DISCORD_THREAD_ID (post into a forum thread)
#
# Char-cap reminder: Discord embed total (title + description + footer +
# field values combined) ~5500. Keep .gitea/forge-posts/v*.md trim.
name: Forge Auto-Announce
on:
push:
tags:
- 'v*'
jobs:
announce:
runs-on: ubuntu-latest
steps:
- name: Checkout tagged tree
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Compose embed
id: embed
env:
TAG: ${{ github.ref_name }}
run: |
POST_FILE=".gitea/forge-posts/${TAG}.md"
if [ ! -f "$POST_FILE" ]; then
echo "No forge-post file for ${TAG} (looked at ${POST_FILE}). Skipping."
echo "skip=true" >> "$GITHUB_OUTPUT"
exit 0
fi
TITLE=$(awk -F': ' '/^title:/ {print $2; exit}' "$POST_FILE" | sed 's/^"//;s/"$//')
SUBTITLE=$(awk -F': ' '/^subtitle:/ {print $2; exit}' "$POST_FILE" | sed 's/^"//;s/"$//')
BODY=$(awk '/^---$/{c++;next} c==2' "$POST_FILE")
jq -n \
--arg title "${TITLE:-Release ${TAG}}" \
--arg subtitle "${SUBTITLE}" \
--arg body "$BODY" \
--arg tag "$TAG" \
--arg repo "${{ github.repository }}" \
'{
embeds: [{
title: $title,
description: ($subtitle + "\n\n" + $body),
color: 12731404,
url: ("https://gitea.hellion-forge.cloud/" + $repo + "/releases/tag/" + $tag),
footer: { text: ($repo + " — " + $tag) }
}]
}' > payload.json
echo "skip=false" >> "$GITHUB_OUTPUT"
- name: Post to Discord
if: steps.embed.outputs.skip != 'true'
env:
WEBHOOK: ${{ secrets.FORGE_DISCORD_WEBHOOK_URL }}
THREAD_ID: ${{ secrets.FORGE_DISCORD_THREAD_ID }}
run: |
if [ -z "$WEBHOOK" ]; then
echo "::error::FORGE_DISCORD_WEBHOOK_URL secret missing"
exit 1
fi
URL="$WEBHOOK"
if [ -n "$THREAD_ID" ]; then
URL="${URL}?thread_id=${THREAD_ID}"
fi
curl -fsS -X POST -H 'Content-Type: application/json' --data @payload.json "$URL"