Skip to content

Automated Release Process

Andy Berry edited this page Jun 24, 2014 · 5 revisions

Release Notes & Metadata

  • Release metadata is stored in releases/<tag.version>.json in the format:
{
    "milestone": "milestoneId",
    "name": "name of the release - probably the same as the tag",
    "description": "release highlights",
    "prerelease": true|false
}  
  • Freeform release notes are stored in releases/<tag.version>.md. This is a freeform text area in markdown format.

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 milestoneID is in releases/<tag>.json
    • GET https://api.github.com/repos/BladeRunnerJS/brjs/issues?milestone=<milestone>&state=closed
    • only issues with set labels are included in this list, this is currently 'bug', 'feature', 'enhancement' or 'experience'. Issues labeled 'invalid', 'duplicate' or 'wont-fix' are ignored.
  • It then appends this to the bottom of the markdown in releases/<tag>.md

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 previous response as the URL for the zip upload
Clone this wiki locally