Skip to content
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

Allow users to commit to the main branch while full release running #40

Commits on Jun 25, 2024

  1. Allow users to commit to the main branch while full release running

    This should fix #37 - ie, a Full Main-Branch release should still succeed, even if someone adds
    additional commits to the `main` branch while the release workflow is running.
    
    Note that this change in behaviour only applies to Full Main-Branch releases, not Preview releases
    (#19), as Preview releases don't
    ever attempt to update any branch.
    
    To avoid the noise of an additional merge commit (ie a 3rd commit) we prefer a fast-forward, and
    only create a merge commit if it's _necessary_ - ie because we have to merge on top of some commits
    that someone else has added.
    
    ## Two full Main-Branch releases can't run concurrently
    
    Although we can now handle extra work on the `main` branch, running **two releases at once** is _not_ recommended!
    
    ## Using the GitHub API to create & merge commits, rather than `git`
    
    We're now using the GitHub API, rather than `git`, to do both these operations:
    
    * [Update the branch](https://docs.github.com/en/rest/git/refs?apiVersion=2022-11-28#update-a-reference) to try fast-forwarding - using the GitHub API means we don't need to clone a deep history of the repo to make that update
    * [Merge the branch](https://docs.github.com/en/rest/branches/branches?apiVersion=2022-11-28#merge-a-branch) if the fast-forward fails - using the GitHub API means that the merge commit will be signed/verified by GitHub too, [just like other commits created by the GitHub App](#26).
    rtyley committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    5f9ba7b View commit details
    Browse the repository at this point in the history