From 641501461e78d1f016bb4fd1860103dd4ccf9f10 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 25 Mar 2026 22:17:12 +0000 Subject: [PATCH 1/2] feat: add GitHub Actions for Sentry, Cloudflare, StatsIG, and more - sentry-release: automated release + deploy tracking on version tags - cloudflare-pages: deploy dashboards to Cloudflare Pages on main push - statsig-gate-check: reusable workflow to gate deploys behind StatsIG flags - release-drafter: auto-generate changelogs from PR labels - nuget-audit: weekly + PR vulnerability scanning for NuGet packages - dashboard-validation: HTML validation + Lighthouse CI for dashboards - contextstream-index: auto-sync ContextStream index on main push https://claude.ai/code/session_015niGCWWtEYykLhYJwA8vcE --- .github/release-drafter.yml | 62 ++++++++++++++++++ .github/workflows/cloudflare-pages.yml | 25 ++++++++ .github/workflows/contextstream-index.yml | 27 ++++++++ .github/workflows/dashboard-validation.yml | 75 ++++++++++++++++++++++ .github/workflows/nuget-audit.yml | 32 +++++++++ .github/workflows/release-drafter.yml | 23 +++++++ .github/workflows/sentry-release.yml | 50 +++++++++++++++ .github/workflows/statsig-gate-check.yml | 54 ++++++++++++++++ 8 files changed, 348 insertions(+) create mode 100644 .github/release-drafter.yml create mode 100644 .github/workflows/cloudflare-pages.yml create mode 100644 .github/workflows/contextstream-index.yml create mode 100644 .github/workflows/dashboard-validation.yml create mode 100644 .github/workflows/nuget-audit.yml create mode 100644 .github/workflows/release-drafter.yml create mode 100644 .github/workflows/sentry-release.yml create mode 100644 .github/workflows/statsig-gate-check.yml diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..7b1726d --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,62 @@ +name-template: "v$RESOLVED_VERSION" +tag-template: "v$RESOLVED_VERSION" + +categories: + - title: "New Features" + labels: + - "feature" + - "enhancement" + - title: "Bug Fixes" + labels: + - "fix" + - "bugfix" + - "bug" + - title: "iRacing" + labels: + - "iracing" + - title: "Dashboard" + labels: + - "dashboard" + - "ui" + - title: "Observability" + labels: + - "observability" + - "logging" + - "metrics" + - title: "Security" + labels: + - "security" + - title: "Dependencies" + labels: + - "dependencies" + - title: "CI/CD" + labels: + - "ci" + - "github-actions" + +change-template: "- $TITLE @$AUTHOR (#$NUMBER)" +change-title-escapes: '\<*_&' + +version-resolver: + major: + labels: + - "major" + - "breaking" + minor: + labels: + - "feature" + - "enhancement" + patch: + labels: + - "fix" + - "bugfix" + - "bug" + - "dependencies" + default: patch + +template: | + ## Changes + + $CHANGES + + **Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION diff --git a/.github/workflows/cloudflare-pages.yml b/.github/workflows/cloudflare-pages.yml new file mode 100644 index 0000000..c9a8fff --- /dev/null +++ b/.github/workflows/cloudflare-pages.yml @@ -0,0 +1,25 @@ +name: Deploy Dashboards to Cloudflare Pages + +on: + push: + branches: [main] + paths: + - "src/SimSteward.Dashboard/**" + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-latest + permissions: + contents: read + deployments: write + + steps: + - uses: actions/checkout@v4 + + - name: Deploy to Cloudflare Pages + uses: cloudflare/wrangler-action@v3 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + command: pages deploy src/SimSteward.Dashboard --project-name=sim-steward-dash diff --git a/.github/workflows/contextstream-index.yml b/.github/workflows/contextstream-index.yml new file mode 100644 index 0000000..5ee470f --- /dev/null +++ b/.github/workflows/contextstream-index.yml @@ -0,0 +1,27 @@ +name: ContextStream Index Sync + +on: + push: + branches: [main] + paths-ignore: + - "*.md" + - ".github/**" + - "docs/**" + +jobs: + index: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v4 + + - name: Install ContextStream CLI + run: npm install -g contextstream-mcp + + - name: Run ContextStream ingest + env: + CONTEXTSTREAM_API_URL: https://api.contextstream.io + CONTEXTSTREAM_PROJECT_ID: ${{ secrets.CONTEXTSTREAM_PROJECT_ID }} + CONTEXTSTREAM_WORKSPACE_ID: ${{ secrets.CONTEXTSTREAM_WORKSPACE_ID }} + CONTEXTSTREAM_API_KEY: ${{ secrets.CONTEXTSTREAM_API_KEY }} + run: pwsh -NoProfile -File scripts/contextstream-ingest.ps1 -Force diff --git a/.github/workflows/dashboard-validation.yml b/.github/workflows/dashboard-validation.yml new file mode 100644 index 0000000..d117c48 --- /dev/null +++ b/.github/workflows/dashboard-validation.yml @@ -0,0 +1,75 @@ +name: Dashboard Validation + +on: + push: + paths: + - "src/SimSteward.Dashboard/**" + pull_request: + paths: + - "src/SimSteward.Dashboard/**" + +jobs: + validate: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Validate HTML files + run: | + errors=0 + for f in src/SimSteward.Dashboard/*.html; do + echo "Checking $f..." + + # Check for unclosed script/style tags + open_script=$(grep -c '' "$f" || true) + if [ "$open_script" -ne "$close_script" ]; then + echo "::error file=$f::Mismatched