Environment Variables
Environment variables provide a secure and flexible way to configure Releasaurus without hardcoding sensitive information or platform-specific settings. This reference covers all supported environment variables and their usage patterns.
Authentication Tokens
Primary Token Variables
GITHUB_TOKEN
Purpose: Authentication token for GitHub API access
Token Types:
Releasaurus supports both classic and fine-grained personal access tokens.
Classic Personal Access Token - Required Scopes:
repo(full control of private repositories)- Includes:
repo:status,repo_deployment,public_repo,repo:invite,security_events
- Includes:
Fine-Grained Personal Access Token - Required Permissions:
- Contents: Read and write access (for reading/updating files and creating commits)
- Issues: Read and write access (for managing PR labels)
- Pull requests: Read and write access (for creating and updating release PRs)
Fine-Grained Personal Access Token - Optional Permissions:
The following permissions may be needed depending on your workflow configuration:
- Actions: Read and write access (if using the GitHub Action and need to trigger workflow runs)
- Workflows: Read and write access (if using the GitHub Action and need to modify workflows)
Example:
export GITHUB_TOKEN="ghp_xxxxxxxxxxxxxxxxxxxx"
Usage:
# With environment variable set
releasaurus release-pr \
--forge github \
--repo "https://github.com/owner/repo"
# Without environment variable (less secure)
releasaurus release-pr \
--forge github \
--repo "https://github.com/owner/repo" \
--token "ghp_xxxxxxxxxxxxxxxxxxxx"
GITLAB_TOKEN
Purpose: Authentication token for GitLab API access
Required Scopes:
api(full API access)read_repository(repository read access)write_repository(repository write access)
Token Types:
- Personal Access Tokens
Example:
export GITLAB_TOKEN="glpat_xxxxxxxxxxxxxxxxxxxx"
Usage:
# GitLab.com
releasaurus release-pr \
--forge gitlab \
--repo "https://gitlab.com/group/project"
# Self-hosted GitLab
releasaurus release-pr \
--forge gitlab \
--repo "https://gitlab.company.com/team/repo"
GITEA_TOKEN
Purpose: Authentication token for Gitea/Forgejo API access
Required Permissions:
- Repository read/write access
- Issue/PR management permissions
Example:
export GITEA_TOKEN="xxxxxxxxxxxxxxxxxx"
Usage:
# Self-hosted Gitea
releasaurus release-pr \
--forge gitea \
--repo "https://git.company.com/org/repo"
# Forgejo instance
releasaurus release-pr \
--forge gitea \
--repo "https://forgejo.example.com/user/project"
Token Selection: Releasaurus automatically selects the appropriate
environment variable based on the --forge flag. Use --token to override
or when the environment variable is not set.
Debug Configuration
RELEASAURUS_DEBUG
Purpose: Enable detailed debug logging for troubleshooting
Values:
- Any value (including
true,false,1,0, etc.) - Enable debug mode - Unset or empty - Disable debug mode (default)
Example:
export RELEASAURUS_DEBUG=true
Usage:
# Enable debug mode via environment variable
export RELEASAURUS_DEBUG=true
releasaurus release-pr \
--forge github \
--repo "https://github.com/owner/repo"
# Alternative: use the --debug flag
releasaurus release-pr \
--debug \
--forge github \
--repo "https://github.com/owner/repo"
Note: Debug mode is enabled whenever RELEASAURUS_DEBUG is set to any
value. To disable debug mode, the variable must be unset or empty. The
--debug flag will always enable debug mode regardless of the environment
variable value.
RELEASAURUS_DRY_RUN
Purpose: Enable dry-run mode to test release workflows without making actual changes
Values:
- Any value (including
true,false,1,0, etc.) - Enable dry-run mode - Unset or empty - Disable dry-run mode (default)
Behavior:
- Performs all analysis and validation steps
- Logs detailed information about what would happen
- Prevents any modifications to your forge platform (branches, PRs, tags, releases)
- Automatically enables debug mode for maximum visibility
Example:
export RELEASAURUS_DRY_RUN=true
Usage:
# Enable dry-run mode via environment variable
export RELEASAURUS_DRY_RUN=true
releasaurus release-pr \
--forge github \
--repo "https://github.com/owner/repo"
releasaurus release \
--forge github \
--repo "https://github.com/owner/repo"
# Alternative: use the --dry-run flag
releasaurus release-pr \
--dry-run \
--forge github \
--repo "https://github.com/owner/repo"
Output: Produces detailed debug logs prefixed with dry_run: showing
exactly what operations would be performed, including PR titles, version
numbers, file changes, and release notes.
Note: Dry-run mode automatically enables debug logging regardless of the
RELEASAURUS_DEBUG setting. This ensures you have maximum visibility into
what would happen during the release process.
Next Steps
- Commands - Command-line options and usage patterns
- Configuration - Configuration file setup
- Troubleshooting - Resolving environment issues