GitHub Action that scans a .NET codebase for FtrIO [Toggle] usage and exports a manifest of required toggle keys. Use as the first step in a deployment safety pipeline, pairing with release-check-action to gate deployments on missing config.
Part of the FtrIO ecosystem — free, open source feature toggles for .NET.
Scans your .cs files for every [Toggle], [ToggleAsync], and manual toggle call and writes a JSON manifest listing every toggle key the codebase uses. The manifest is uploaded as a build artifact so downstream deployment pipelines can download it and validate it against a target config before deploying.
The manifest contains only key names and source locations — no config values, no secrets. It is safe to upload as a public artifact.
Manifest format:
{
"generatedAt": "2026-06-21T16:00:00Z",
"toggles": [
{ "key": "SendWelcomeEmail", "source": "[Toggle]", "file": "Services/EmailService.cs", "line": 17 },
{ "key": "NewCheckoutFlow", "source": "[Toggle]", "file": "Services/OrderService.cs", "line": 42 },
{ "key": "PaymentV2", "source": "[ToggleAsync]","file": "Services/PaymentService.cs", "line": 88 },
{ "key": "BetaSearch", "source": "ManualCall", "file": "Controllers/SearchController.cs","line": 23 }
]
}- uses: actions/checkout@v4
- uses: FtrOnOff/export-manifest-action@v1
with:
source: ./srcThe manifest is written to toggles.manifest.json and uploaded as a build artifact named toggle-manifest.
| Input | Default | Description |
|---|---|---|
source |
. |
Directory to scan for .cs files |
output |
toggles.manifest.json |
Path to write the manifest JSON |
upload-artifact |
true |
Upload the manifest as a GitHub Actions artifact |
artifact-name |
toggle-manifest |
Name of the uploaded artifact |
artifact-retention-days |
30 |
Days to retain the artifact |
version |
(latest) | Pin a specific version of FtrIO.onetwo |
| Output | Description |
|---|---|
manifest-path |
Path to the generated manifest file |
toggle-count |
Number of toggle keys found |
artifact-name |
Name of the uploaded artifact |
- uses: actions/checkout@v4
- uses: FtrOnOff/export-manifest-action@v1- uses: FtrOnOff/export-manifest-action@v1
with:
source: ./src
output: ./artifacts/toggles.manifest.json- uses: FtrOnOff/export-manifest-action@v1
with:
source: ./src
upload-artifact: falseUseful when both export and release-check run in the same job and the manifest can be passed directly via the filesystem.
- uses: FtrOnOff/export-manifest-action@v1
id: manifest
- name: Print summary
run: |
echo "Manifest written to ${{ steps.manifest.outputs.manifest-path }}"
echo "Found ${{ steps.manifest.outputs.toggle-count }} toggles"name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v5
with:
dotnet-version: '8.0.x'
- name: Build
run: dotnet build
- name: Test
run: dotnet test
- name: Export FtrIO toggle manifest
uses: FtrOnOff/export-manifest-action@v1
with:
source: ./src
artifact-name: toggle-manifest
artifact-retention-days: 30The manifest artifact is retained for 30 days — long enough for the deployment pipeline to download it at release time.
This action is the first half of FtrIO's deployment safety pipeline. The second half is release-check-action, which downloads the manifest from the build artifact and validates it against the target environment's config before deploying.
App CI pipeline Deployment pipeline
──────────────────────────────── ────────────────────────────────
export-manifest-action → release-check-action
Scans source for [Toggle] keys Downloads manifest artifact
Uploads toggles.manifest.json Fetches target appsettings.json
Checks every key is present
Blocks deploy if any are missing
App CI (build.yml):
- uses: FtrOnOff/export-manifest-action@v1
with:
source: ./src
artifact-name: toggle-manifestDeployment pipeline (deploy.yml):
- uses: FtrOnOff/release-check-action@v1
with:
artifact-name: toggle-manifest
config-url: ${{ secrets.PRODUCTION_CONFIG_URL }}
fail-on-missing: true
- name: Deploy
needs: release-check
run: echo "deploying..."| Tool | Purpose |
|---|---|
| FtrIO | Core library. [Toggle] attribute woven into IL at compile time. |
| FtrIO.Toaster | Self-hosted Docker UI for managing toggles live. |
| FtrIO.onetwo | CLI audit tool. This action wraps it. |
| ftrio-action | General toggle audit action for CI. |
| release-check-action | Gate deployments on missing toggle config. |
Full docs: ftronoff.github.io/FtrIO