A: The release workflow requires the GitHub Actions bot to have permission to push commits to the main branch. This is necessary because semantic-release creates a commit to update version numbers in files.
-
For GitHub.com repositories:
- Go to Settings → Actions → General
- Under "Workflow permissions", select "Read and write permissions"
- Check "Allow GitHub Actions to create and approve pull requests"
- Click "Save"
-
For GitHub Enterprise repositories:
- Ensure the GitHub Actions bot (
github-actions[bot]) has write access to the repository - Check branch protection rules for the main branch:
- Go to Settings → Branches
- Edit the protection rule for
main - Under "Restrict who can push to matching branches", ensure GitHub Actions is allowed
- Alternatively, add a bypass for the GitHub Actions bot
- Ensure the GitHub Actions bot (
-
For organizations with restricted permissions:
- The organization may need to explicitly grant the GitHub Actions app permission to push
- Contact your organization administrators if default permissions are restricted
A: Semantic-release uses conventional commits to determine the next version. If there are no commits following the conventional commit format since the last release, it won't create a new release.
Ensure your commits follow the format:
feat:for new features (triggers minor version bump)fix:for bug fixes (triggers patch version bump)BREAKING CHANGE:in the commit body (triggers major version bump)- Other types like
docs:,chore:,style:don't trigger releases
A: No, the workflow is designed to automatically determine the version based on conventional commits. This ensures consistent versioning across all projects. If you need a specific version, ensure your commits indicate the appropriate change level.
A: You can test the release process locally using:
task release -- --no-push --no-vcs-releaseThis will:
- Calculate the next version based on commits
- Update version files
- Generate changelog entries (if configured)
- But NOT push to git or create GitHub releases
A: Releases are triggered through GitHub Actions:
- Go to Actions → Release workflow
- Click "Run workflow"
- Select the branch (usually
main) - Click "Run workflow"
The workflow will automatically determine the version based on commits since the last release.