This repository uses release-please for automated releases via the googleapis/release-please-action. This guide explains how to configure the necessary permissions.
If you see this error:
Error: release-please failed: GitHub Actions is not permitted to create or approve pull requests.
You need to configure repository permissions. Choose one of the solutions below:
- Go to your repository on GitHub
- Navigate to Settings → Actions → General
- Under "Workflow permissions":
- Select "Read and write permissions"
- Check "Allow GitHub Actions to create and approve pull requests"
- Click Save
This allows the default GITHUB_TOKEN to create release PRs.
If you prefer not to enable broad GitHub Actions permissions:
-
Create a Personal Access Token:
- Go to GitHub Settings → Developer settings → Personal access tokens → Tokens (classic)
- Click "Generate new token (classic)"
- Select scopes:
repo(full control of private repositories) - Copy the generated token
-
Add as Repository Secret:
- Go to your repository → Settings → Secrets and variables → Actions
- Click "New repository secret"
- Name:
RELEASE_PLEASE_TOKEN - Value: Your PAT from step 1
- Click "Add secret"
The workflow is already configured to use RELEASE_PLEASE_TOKEN if available, falling back to GITHUB_TOKEN.
For organizations preferring app-based authentication:
- Create a GitHub App with these permissions:
- Repository permissions: Contents (write), Pull requests (write), Metadata (read)
- Install the app on your repository
- Configure the workflow to use app authentication
Once configured, release-please will:
- Monitor commits on the main branch for conventional commit messages
- Create release PRs automatically when it detects releasable changes
- Generate changelogs from commit messages
- Create GitHub releases when release PRs are merged
- Trigger builds to upload release assets
Use these commit prefixes to trigger releases:
feat:- New feature (minor version bump)fix:- Bug fix (patch version bump)feat!:orfix!:- Breaking change (major version bump)chore:,docs:,style:,refactor:,test:- No version bump
After configuration, test by pushing a commit:
git commit -m "feat: add new feature"
git push origin mainRelease-please should create a PR within a few minutes.
- No PR created: Check that conventional commit format is used
- Permission errors: Verify GitHub Actions permissions are enabled
- Token issues: Ensure
RELEASE_PLEASE_TOKENhas correct scopes - Workflow not running: Check that the workflow file is on the main branch
- Release type: Go
- Current version: 0.2.0
- Config file:
.release-please-config.json - Manifest file:
.release-please-manifest.json - Changelog sections: Features, Bug Fixes, Performance, etc.