Files
community_bridge/.github/workflows/main.yml
T
MrNewbandClaude Fable 5 55e7aae424 ci: ship built UI only and fix webhook workflow
The release package excluded nothing under web/, so releases carried
the vite source, package manifests and configs. Ship web/dist and
web/public only, matching the 0.13.4 asset layout.

The webhook workflow linked to the old The-Order-Of-The-Sacred-Framework
URL, which now only 301s; point it at the current repo's latest
release. It reads just the event payload, so the checkout and jq
install steps were removed and permissions narrowed to contents: read.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-01 01:35:42 -04:00

73 lines
2.4 KiB
YAML

name: Update Webhook Notification
on:
release:
types: [published]
permissions:
contents: read
jobs:
send-webhook:
runs-on: ubuntu-latest
steps:
# Reads only the release event payload, so no checkout is needed and jq
# is already present on the runner image.
- name: Send webhook notification
env:
WEBHOOK_URL: ${{ secrets.RELEASE_WEBHOOK_URL }}
run: |
# Extract repository name and release details
REPO_NAME=$(basename "$GITHUB_REPOSITORY")
RELEASE_VERSION=$(jq -r '.release.tag_name // "Unknown Version"' "$GITHUB_EVENT_PATH")
TITLE="$REPO_NAME $RELEASE_VERSION"
DESCRIPTION=$(jq -r '.release.body // "No description provided."' "$GITHUB_EVENT_PATH")
# Construct JSON payload
PAYLOAD=$(jq -n \
--arg title "$TITLE" \
--arg description "$DESCRIPTION" \
'{
"content": "<@&1337224918710095882>",
"allowed_mentions": { "parse": ["roles"] },
"embeds": [
{
"title": $title,
"description": $description,
"color": 15105570,
"footer": { "text": "🔄 Download the latest version of community_bridge to ensure compatibility." },
"image": {
"url": "https://avatars.githubusercontent.com/u/192999457?s=400&u=da632e8f64c85def390cfd1a73c3b664d6882b38&v=4"
}
}
],
"components": [
{
"type": 1,
"components": [
{
"type": 2,
"style": 5,
"label": "Get The Latest Release From Portal",
"url": "https://portal.cfx.re/assets/granted-assets"
},
{
"type": 2,
"style": 5,
"label": "Get The Latest Community Bridge Release",
"url": "https://github.com/TheOrderFivem/community_bridge/releases/latest"
}
]
}
]
}')
# Debugging: Print the payload for verification
echo "$PAYLOAD"
# Send webhook
curl -X POST "$WEBHOOK_URL" \
-H "Content-Type: application/json" \
--data-raw "$PAYLOAD" || exit 1