-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configure GitHub bot for automated releases and protected branches #104
Comments
The challenge here is that branch protection rules that require a PR thwart semantic release, which needs to push tags, updated A potential solution to this is detailed here: https://gonzalohirsch.com/blog/semantic-release-and-branch-protection-rules/ |
This solution requires installing a GitHub App in the repository, which is a permissions issue. GitHub Copilot suggests an alternative: turn off branch protection, and: Developers create feature branches off the alpha branch and open pull requests to merge their changes back into alpha. When the changes in alpha are ready to be released, the CI runs semantic-release on the alpha branch. semantic-release determines the next version number based on the commits, generates the release notes, updates the version number in package.json, creates a git tag, pushes the changes back to alpha, and publishes the package to the npm registry. When alpha is ready to be merged into main, a pull request is opened to merge alpha into main. The CI runs semantic-release on the main branch. semantic-release determines the next version number based on the commits, generates the release notes, updates the version number in package.json, creates a git tag, pushes the changes back to main, and publishes the package to the npm registry. |
This workflow is implemented now. This allows releases to take place, but does not enforce pull requests to the release branches ( I've put in a request to have a GitHub App added to the repo to allow this one to be implemented later. That workflow will enforce PRs to be merged to create a release at the repo level. |
Automated releases from main are working. |
The workflow is like this:
All development work should be done via PRs against the
alpha
branch.When a PR is merged to
alpha
, the tests are run, thensemantic-release
runs to determine if a new release is required. If it is, then an alpha package is published to NPM.Production releases are accomplished by opening a PR from
alpha
tomain
.When a PR is merged into main,
semantic-release
runs and if a new package release is required, a package is published to NPM.The text was updated successfully, but these errors were encountered: