Skip to main content
Version: Next

Release Intent Configuration

Complete guide to configuring releases using the intent.yaml file.

Overviewโ€‹

The .github/tag_and_release/intent.yaml file is the central configuration hub for both release behavior and comprehensive project settings. This intent-driven system provides a single source of truth for all release and project configuration.

File Locationโ€‹

.github/tag_and_release/intent.yaml

Configuration Architectureโ€‹

Two-Step Parsing Processโ€‹

  1. Configuration Parsing (rw_parse_project_config.yaml):

    • Loads and validates the complete intent.yaml structure
    • Provides structured outputs for project, git, docker, validation, and docs settings
    • Applies smart defaults for missing configuration sections
    • Auto-detects project and package names
  2. Release Intent Analysis (rw_parse_release_intent.yaml):

    • Focuses on release-specific logic (release, level, artifacts, notes)
    • Compatible with both legacy and enhanced configuration formats
    • Uses configuration parser outputs for enhanced validation

Complete Configuration Schemaโ€‹

# === RELEASE INTENT CONFIGURATION ===
# Master release control
release: true # boolean - Enable/disable releases entirely

# Version bump configuration
level: "auto" # string - Version bump level

# Artifact publishing configuration
artifacts:
python: "auto" # string - Python package publishing
docker: "auto" # string - Docker image publishing
docs: # object | string - Documentation versioning
mode: "auto" # string - Docs versioning mode
sections: ["docs", "dev"] # array - Docusaurus sections to version
strategy: "changed" # string - Versioning strategy

# Release notes
notes: "Release description" # string - GitHub release notes

# === ENHANCED PROJECT CONFIGURATION ===
# Project identification and settings
project:
name: null # string | null - Project name (auto-detected)
package_name: null # string | null - Python package name (auto-detected)
base_branch: "master" # string - Default branch for operations

# Git configuration for automated commits
git:
commit:
name: "GitHub Actions Bot" # string - Git commit author name
email: "actions@github.com" # string - Git commit author email

# Python package configuration
python:
auth_method: "oidc" # string - PyPI authentication method (oidc | token)

# Docker configuration for container operations
docker:
registries:
dockerhub: "docker.io" # string - Docker Hub registry URL
ghcr: "ghcr.io" # string - GitHub Container Registry URL
health_check:
path: "/health" # string - Health check endpoint path
port: 8000 # number - Health check port
run_options: "-e VAR=value" # string - Docker run options

# Validation and staging configuration
validation:
version: "1.0.0-validation" # string - Version for validation workflows
test_version: "validation-test" # string - Test version identifier

# Documentation configuration
docs:
paths:
readme: "README.md" # string - README file path
installation: "docs/INSTALLATION.md" # string - Installation guide path
ci_cd: "docs/CI_CD.md" # string - CI/CD documentation path
preview:
branch: "docs-preview" # string - Documentation preview branch

Release Intent Configurationโ€‹

1. Master Release Controlโ€‹

release (boolean, default: true)

Controls whether releases are enabled.

# Enable releases
release: true

# Disable releases entirely
release: false

Behavior:

  • true: Enable release processing with all configured workflows
  • false: Skip all release operations

2. Version Bump Levelโ€‹

level (string, default: "auto")

Controls semantic version bumping.

# Automatic version detection from commit messages
level: auto

# Force specific version bumps
level: patch # 1.0.0 โ†’ 1.0.1
level: minor # 1.0.0 โ†’ 1.1.0
level: major # 1.0.0 โ†’ 2.0.0

Options:

  • "auto": Determine version bump automatically based on commit messages
  • "patch": Force patch version bump (bug fixes)
  • "minor": Force minor version bump (new features)
  • "major": Force major version bump (breaking changes)

3. Python Package Configurationโ€‹

artifacts.python (string, default: "auto")

Controls Python package publishing to PyPI.

artifacts:
# Conditional publishing (recommended)
python: auto

# Always publish
python: force

# Skip publishing
python: skip

Options:

  • "auto": Publish if package files changed
  • "force": Always publish regardless of changes
  • "skip": Skip Python package publishing

PyPI Authentication Methodsโ€‹

OIDC Auth Token Auth

Configuration:

python:
auth_method: "oidc" # or "token"

Benefits:

  • โœ… Keyless authentication
  • โœ… No API tokens to manage
  • โœ… Enhanced security
  • โœ… Zero secrets required

Setup:

  1. Configure PyPI Trusted Publisher
  2. Set auth_method: oidc in intent.yaml
  3. No additional secrets needed

How OIDC Works:

Token Authentication (Legacy)โ€‹

Benefits:

  • โœ… Backward compatible
  • โœ… Universal support
  • โœ… Simple migration

Setup:

  1. Generate PyPI API tokens
  2. Add PYPI_API_TOKEN and TEST_PYPI_API_TOKEN secrets
  3. Set auth_method: token in intent.yaml

Comparison:

FeatureOIDCToken
Security๐ŸŸข Keyless๐ŸŸก Requires rotation
Setup๐ŸŸข Simple๐ŸŸก Moderate
Maintenance๐ŸŸข Zero๐ŸŸก Regular rotation
Secrets๐ŸŸข None๐Ÿ”ด 2 required

4. Docker Image Configurationโ€‹

artifacts.docker (string, default: "auto")

Controls Docker image publishing to both DockerHub and GHCR.

artifacts:
# Conditional publishing (recommended)
docker: auto

# Always publish
docker: force

# Skip publishing
docker: skip

Options:

  • "auto": Publish if Docker-related files changed
  • "force": Always publish to both registries
  • "skip": Skip Docker image publishing
Automatic Dockerfile Detection

Even with docker: force, the workflow gracefully skips Docker processes if no Dockerfile is found in the repository root. This ensures the same workflows work for both Docker-based and Python-only projects.

Dual Registry Publishing:

When enabled, Docker images are published to both:

  1. DockerHub (docker.io)
  2. GHCR (ghcr.io)

Both registries receive identical images with the same version tags.

5. Documentation Configurationโ€‹

artifacts.docs (object | string)

Controls documentation versioning with support for both legacy and enhanced formats.

Legacy Format (String)โ€‹

artifacts:
docs: "auto" # auto, force, skip

Enhanced Format (Object)โ€‹

artifacts:
docs:
mode: "auto" # auto, force, skip
sections: ["docs", "dev"] # array of section names
strategy: "changed" # changed, always

Configuration Options:

docs.mode (string, default: "auto")

  • "auto": Version docs based on strategy and change detection
  • "force": Always version docs regardless of changes
  • "skip": Skip documentation versioning

docs.sections (array, default: ["docs", "dev"])

  • "docs": Main user documentation
  • "dev": Development/contributor documentation
  • "api": API reference documentation

docs.strategy (string, default: "changed")

  • "changed": Only version sections with file changes
  • "always": Version all configured sections

6. Release Notesโ€‹

notes (string, default: "")

GitHub release notes content.

# Simple notes
notes: "Bug fixes and improvements"

# Multi-line notes
notes: |
## What's New
- Feature A
- Feature B

## Bug Fixes
- Fixed issue X

Project Configurationโ€‹

1. Project Settingsโ€‹

project (object)

Project identification and base settings.

project:
name: null # Auto-detected from repository
package_name: null # Auto-detected from pyproject.toml
base_branch: "master" # Default branch

Fields:

  • name: Project name (auto-detected from repository)
  • package_name: Python package name (extracted from pyproject.toml)
  • base_branch: Default branch for operations

2. Git Configurationโ€‹

git (object)

Git commit settings for automated operations.

git:
commit:
name: "GitHub Actions Bot"
email: "actions@github.com"

Fields:

  • commit.name: Author name for automated commits
  • commit.email: Author email for automated commits

Usage:

# Version bump commits use these settings
- name: Configure Git
run: |
git config user.name "${{ needs.config.outputs.git_commit_name }}"
git config user.email "${{ needs.config.outputs.git_commit_email }}"

3. Docker Configurationโ€‹

docker (object)

Comprehensive Docker deployment configuration.

docker:
registries:
dockerhub: "docker.io"
ghcr: "ghcr.io"
health_check:
path: "/health"
port: 8000
run_options: "-e API_TOKEN=test_token -e DEBUG=true"

Fields:

  • registries.dockerhub: Docker Hub registry URL
  • registries.ghcr: GitHub Container Registry URL
  • health_check.path: Health check endpoint path
  • health_check.port: Health check port
  • run_options: Flexible Docker run options string

Advanced Docker Run Options:

# Basic environment variables
docker:
run_options: "-e API_TOKEN=test_token -e DEBUG=true"

# With volumes
docker:
run_options: "-e API_TOKEN=test -v /host/data:/app/data -v /host/logs:/app/logs"

# Complex configuration
docker:
run_options: "-e API_TOKEN=test --network mynetwork --memory=512m --cpus=0.5"

# Production-ready
docker:
run_options: "-e NODE_ENV=production -e API_TOKEN=prod --network prod-network --restart unless-stopped -v /data:/app/data"

Benefits:

  • Multiple environment variables in one string
  • Volume mounts for data persistence
  • Network configuration
  • Resource limits
  • Runtime options

4. Validation Configurationโ€‹

validation (object)

Settings for validation and staging workflows.

validation:
version: "1.0.0-validation"
test_version: "validation-test"

Fields:

  • version: Version identifier for validation workflows
  • test_version: Test version identifier for staging

Usage:

# TestPyPI deployment uses validation version
VERSION: ${{ needs.config.outputs.validation_version }}

5. Documentation Configurationโ€‹

docs (object)

Documentation paths and preview settings.

docs:
paths:
readme: "README.md"
installation: "docs/INSTALLATION.md"
ci_cd: "docs/CI_CD.md"
preview:
branch: "docs-preview"

Fields:

  • paths.readme: README file path
  • paths.installation: Installation guide path
  • paths.ci_cd: CI/CD documentation path
  • preview.branch: Preview branch name

Configuration Examplesโ€‹

# Only release what has actually changed
release: true
level: auto
artifacts:
python: auto
docker: auto
docs:
mode: auto
sections: ["docs", "dev"]
strategy: changed
notes: "Automatic release with change detection"

Example 2: Force Full Releaseโ€‹

# Force release all artifacts
release: true
level: patch
artifacts:
python: force
docker: force
docs:
mode: force
sections: ["docs", "dev", "api"]
strategy: always
notes: "Full release of all components"

Example 3: Python-Only Releaseโ€‹

# Only release Python package
release: true
level: minor
artifacts:
python: force
docker: skip
docs: skip
notes: "Python package only release"

Example 4: Documentation-Only Releaseโ€‹

# Only version documentation
release: true
level: patch
artifacts:
python: skip
docker: skip
docs:
mode: force
sections: ["docs", "dev"]
strategy: always
notes: "Documentation update release"

Example 5: Complete Configurationโ€‹

# === RELEASE INTENT ===
release: true
level: auto
artifacts:
python: auto
docker: auto
docs:
mode: auto
sections: ["docs", "dev"]
strategy: changed
notes: |
## What's New
- Feature X

## Bug Fixes
- Fixed issue Y

# === PROJECT CONFIGURATION ===
project:
name: null
package_name: null
base_branch: "master"

git:
commit:
name: "GitHub Actions Bot"
email: "actions@github.com"

python:
auth_method: "oidc"

docker:
registries:
dockerhub: "docker.io"
ghcr: "ghcr.io"
health_check:
path: "/health"
port: 8000
run_options: "-e API_TOKEN=test_token -e DEBUG=true"

validation:
version: "1.0.0-validation"
test_version: "validation-test"

docs:
paths:
readme: "README.md"
installation: "docs/INSTALLATION.md"
ci_cd: "docs/CI_CD.md"
preview:
branch: "docs-preview"

Behavioral Matrixโ€‹

Docker Configuration Behaviorโ€‹

Dockerfile ExistsConfig: docker: autoConfig: docker: forceConfig: docker: skip
โœ… YesPublishes if changedAlways publishesAlways skips
โŒ NoSkips (no Dockerfile)Skips (no Dockerfile)Always skips

Python and Documentation Behaviorโ€‹

ConfigurationChanged FilesBehavior
python: autoPython files changedโœ… Publishes to PyPI
python: autoNo Python files changedโญ๏ธ Skips publishing
python: forceAny/no changesโœ… Always publishes
python: skipAny/no changesโญ๏ธ Always skips
docs.mode: auto, strategy: changedDocs files changedโœ… Versions changed sections
docs.mode: auto, strategy: alwaysAny changesโœ… Versions all sections
docs.mode: forceAny/no changesโœ… Always versions

Configuration Validationโ€‹

The release intent parser includes JSON schema validation:

  • Invalid Options: Rejected with clear error messages
  • Type Checking: Ensures correct data types
  • Required Fields: Validates essential configuration
  • Default Values: Applies sensible defaults

Example Validation Errors:

# โŒ Invalid configuration
level: invalid_level # Error: Must be auto, patch, minor, or major
artifacts:
docs:
strategy: invalid # Error: Must be changed or always
sections: "not-array" # Error: Must be array of strings

Best Practicesโ€‹

1. Use Conservative Configurationโ€‹

Start with auto settings and change detection:

artifacts:
python: auto
docker: auto
docs:
mode: auto
strategy: changed

2. Enable OIDC Authenticationโ€‹

For PyPI, use OIDC instead of tokens:

python:
auth_method: "oidc"

3. Version Documentation Selectivelyโ€‹

Only version changed sections:

artifacts:
docs:
mode: auto
sections: ["docs", "dev"]
strategy: changed

4. Write Clear Release Notesโ€‹

notes: |
## What's New
- Added feature X

## Bug Fixes
- Fixed issue Y

## Breaking Changes
- Changed API Z

5. Test Configuration Changesโ€‹

Always validate configuration before production:

# Run validation workflow
gh workflow run release-validate.yml

Troubleshootingโ€‹

Configuration Not Taking Effectโ€‹

Symptoms:

  • Workflows use default values despite custom config

Solutions:

  1. Verify intent.yaml syntax
  2. Check config parsing job logs
  3. Ensure config job runs before dependent jobs
  4. Review config output values

Schema Validation Errorsโ€‹

Symptoms:

  • Release intent parsing fails

Solutions:

  1. Check configuration syntax against schema
  2. Use JSON schema validator
  3. Review error messages in logs
  4. Verify data types match requirements

Docker Jobs Skipped Unexpectedlyโ€‹

Symptoms:

  • Docker jobs skip even with docker: force

Solutions:

  1. Verify Dockerfile exists in repository root
  2. Check "Dockerfile Check" step in logs
  3. Ensure Dockerfile is committed to branch

Testing Configurationโ€‹

Local Testingโ€‹

# Run release intent script locally
uv run python scripts/ci/release_intent.py

# Validates schema and shows full parsed config

Workflow Testingโ€‹

# Test configuration parsing
gh workflow run release-validate.yml

# Check config outputs
gh run list --workflow=release-validate.yml --limit=1
gh run view <run-id> --log

Debug Configurationโ€‹

# Add debug step to any workflow
- name: Debug Configuration
env:
CONFIG_OUTPUTS: ${{ toJson(needs.config.outputs) }}
run: |
echo "=== PARSED CONFIGURATION ==="
echo "$CONFIG_OUTPUTS" | jq '.'