This repository was archived by the owner on Jul 11, 2026. It is now read-only.
Repository navigation
SCF API v2026.1 — automated pipeline with 249 framework crosswalks #7
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 | |
| on: | |
| push: | |
| branches: [main] | |
| paths: [".scf-version"] | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Read version | |
| id: version | |
| run: | | |
| VERSION=$(cat .scf-version) | |
| echo "tag=$VERSION" >> "$GITHUB_OUTPUT" | |
| echo "Version: $VERSION" | |
| - name: Check if tag exists | |
| id: check | |
| env: | |
| TAG: ${{ steps.version.outputs.tag }} | |
| run: | | |
| if git rev-parse "refs/tags/$TAG" >/dev/null 2>&1; then | |
| echo "skip=true" >> "$GITHUB_OUTPUT" | |
| echo "Tag $TAG already exists, skipping." | |
| else | |
| echo "skip=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Get stats | |
| if: steps.check.outputs.skip != 'true' | |
| id: stats | |
| run: | | |
| CONTROLS=$(node -e "console.log(require('./docs/api/summary.json').total_controls)") | |
| FAMILIES=$(node -e "console.log(require('./docs/api/summary.json').total_families)") | |
| FRAMEWORKS=$(node -e "console.log(require('./docs/api/summary.json').crosswalk_frameworks.length)") | |
| echo "controls=$CONTROLS" >> "$GITHUB_OUTPUT" | |
| echo "families=$FAMILIES" >> "$GITHUB_OUTPUT" | |
| echo "frameworks=$FRAMEWORKS" >> "$GITHUB_OUTPUT" | |
| - name: Create tag and release | |
| if: steps.check.outputs.skip != 'true' | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| TAG: ${{ steps.version.outputs.tag }} | |
| CONTROLS: ${{ steps.stats.outputs.controls }} | |
| FAMILIES: ${{ steps.stats.outputs.families }} | |
| FRAMEWORKS: ${{ steps.stats.outputs.frameworks }} | |
| run: | | |
| git tag "$TAG" | |
| git push origin "$TAG" | |
| gh release create "$TAG" \ | |
| --title "SCF $TAG" \ | |
| --notes "Mirrors [SCF $TAG](https://github.com/securecontrolsframework/securecontrolsframework/releases/tag/$TAG). $CONTROLS controls, $FAMILIES families, $FRAMEWORKS framework crosswalks." |