Skip to content

Automated Release Process

Andy Berry edited this page Nov 1, 2013 · 5 revisions

This is still a work in progress


Release Notes

  • Release options are created throughout the sprint and stored in releases/<tag.version>.json in the format:
{
    "tag_name": "tag for this release",	
    "milestone": "milestone",
    "name": "name of the release - probably the same as the tag",
    "description": "release highlights",
    "prerelease": true|false
}  

Creating the release tag

  • CI runs the various tests and goes green
  • Create an annotated tag for the commit that is released
  • push the tag

Generate the release notes

  • The build first finds all issues in the milestone that are closed using the GitHub API
    • the milestone is in release/<tag>.json
    • GET https://api.github.com/repos/BladeRunnerJS/brjs/issues?milestone=<milestone>&state=closed
    • using the description field from release/<tag>.json as the main body of the uploaded release note, appending the completed issues

Creating the release

  • Trigger the release stage in CI
    • This will calculate the latest annotate tag (the one we just made)
      • using git describe --abbrev=0
  • The build checks the release doesn't already exist
    • GET https://api.github.com/repos/BladeRunnerJS/brjs/releases
    • if it does - it uses PATCH in the next step, otherwise we use POST
  • The build creates the release
    • <POST|PATCH> https://api.github.com/repos/BladeRunnerJS/brjs/releases
    • The body of the request is (this is all taken from release/<tag>.json):
{
    "tag_name": "<tag name>",
    "name": "<release name>",
    "body": "<RELEASE NOTES>"
    "prerelease": true|false,
}
  • store the upload_url from the response

Uploading the binary

  • The build uses the upload_url field from the response previously as the URL for the zip upload
Clone this wiki locally