Bump Capacium manifests to v1.1.0, target all 8 frameworks #54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release Readiness Gate | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, labeled, unlabeled] | |
| branches: [main] | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: "Version to check (e.g., 0.6.0)" | |
| required: false | |
| type: string | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| checks: write | |
| jobs: | |
| readiness-check: | |
| name: Check Release Readiness | |
| runs-on: ubuntu-latest | |
| outputs: | |
| can_release: ${{ steps.gate.outputs.can_release }} | |
| passed_count: ${{ steps.gate.outputs.passed_count }} | |
| failed_count: ${{ steps.gate.outputs.failed_count }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: pip install PyYAML | |
| - name: Determine version and latest tag | |
| id: versions | |
| run: | | |
| if [ "${{ github.event.inputs.version }}" != "" ]; then | |
| VERSION="${{ github.event.inputs.version }}" | |
| else | |
| VERSION=$(python3 -c 'import re; c=open("pyproject.toml").read(); m=re.search(r"^version\s*=\s*\"([^\"]+)\"",c,re.MULTILINE); print(m.group(1) if m else "unknown")') | |
| fi | |
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | |
| LATEST_TAG=$(git tag --list 'v*' --sort=-v:refname | head -1 || echo "") | |
| echo "latest_tag=$LATEST_TAG" >> "$GITHUB_OUTPUT" | |
| echo "Version: $VERSION, Latest tag: $LATEST_TAG" | |
| - name: Run release readiness gate | |
| id: gate | |
| env: | |
| RELEASE_VERSION: ${{ steps.versions.outputs.version }} | |
| RELEASE_LATEST_TAG: ${{ steps.versions.outputs.latest_tag }} | |
| run: | | |
| PYTHONPATH=src python3 -c "from skillweave.github_integration.release_gate import run_cli; run_cli()" | |
| - name: Upload gate report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: release-readiness-gate | |
| path: | | |
| release-gate-report.md | |
| release-gate-data.json | |
| - name: Comment PR with gate result | |
| if: github.event_name == 'pull_request' | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const fs = require('fs'); | |
| const report = fs.readFileSync('release-gate-report.md', 'utf8'); | |
| const data = JSON.parse(fs.readFileSync('release-gate-data.json', 'utf8')); | |
| const { owner, repo } = context.repo; | |
| const issue_number = context.payload.pull_request.number; | |
| const header = data.can_release | |
| ? '## ✅ Release Readiness: PASSED' | |
| : '## ❌ Release Readiness: BLOCKED'; | |
| const body = header + '\n\n' + report; | |
| await github.rest.issues.createComment({ | |
| owner, | |
| repo, | |
| issue_number, | |
| body: body.slice(0, 65000), | |
| }); | |
| core.notice(`Release readiness comment posted on PR #${issue_number}`); |