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..b31ac81 --- /dev/null +++ b/.github/workflows/cloudflare-pages.yml @@ -0,0 +1,27 @@ +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: + # actions/checkout@v4 + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 + + - name: Deploy to Cloudflare Pages + # cloudflare/wrangler-action@v3 + uses: cloudflare/wrangler-action@da0e0dfe58b7a431659754fdf3f186c529afbe65 + 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..c5afee7 --- /dev/null +++ b/.github/workflows/contextstream-index.yml @@ -0,0 +1,28 @@ +name: ContextStream Index Sync + +on: + push: + branches: [main] + paths-ignore: + - "*.md" + - ".github/**" + - "docs/**" + +jobs: + index: + runs-on: windows-latest + + steps: + # actions/checkout@v4 + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 + + - 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..0709f73 --- /dev/null +++ b/.github/workflows/dashboard-validation.yml @@ -0,0 +1,78 @@ +name: Dashboard Validation + +on: + push: + paths: + - "src/SimSteward.Dashboard/**" + pull_request: + paths: + - "src/SimSteward.Dashboard/**" + +jobs: + validate: + runs-on: ubuntu-latest + + steps: + # actions/checkout@v4 + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 + + - 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