Skip to content

How to create a release

George M. Dias edited this page Oct 3, 2023 · 11 revisions

Pre-Release

Create a Branch

  • Branch from the main
  • Create a pull request (PR)
  • Clone the PR locally

Make Updates to API Specification

  • Make the necessary code updates to the eMASS API specification file
    • eMASSRestOpenApi.yaml

Update the Packages Version

  • Make the necessary changes (update the version field) of the clients generation configuration files:
    • Ruby (src/openapi/templates/ruby/ruby-generator-config.json)
    • Typescript(src/openapi/templates/typescript/typescript-generator-config.json)
    • Python (src/openapi/templates/python/python-generator-config.json)

Generate Clients using OpenAPI Generator via Docker

Run the OpenAPI Generator using Docker to test how the github workflow generate-clients.yml action will behave.

To install use:

docker pull openapitools/openapi-generator-cli

To test use:

To run, we need to bind a local directory to the docker via the -v option.
The following example mounts the directory local located in the current directory (where docker is started).
The bound directory is used for all input/output content to include the API specification file, the templates (-t) and the configuration (-c) files.

docker run --rm -v %cd%/local:/local openapitools/openapi-generator-cli generate -i local/eMASSRestOpenApi-v3.11.yaml -g python -t local/templates/python/mustache -c local/templates/python_config.json -o /local/out/python/mustache

Where:

  • -t Directory where the modified templates are locate
  • -c The configuration file (defines the packages name, version, and other settings)
  • -i The API specification file (.yaml)
  • -o The output directory

The above example generates a python client based on the eMASSRestOpenApi-v3.11.yaml API specification, and uses the json and mustache configuration files located in the templates directory. See the OpenAPITools for details.

Once the clients are generated and verified that they contain the new API specification modifications it is safe to push and merge the PR

Push and Merge the PR

  • Push the updates to the working branch
  • Merge the working branch with main branch
  • Ensure that all of the GitHub actions pass

Note Changes to the API specifications file forces the generation of the clients API code (ruby, typescript, and python) when merging with the main branch.

Release

  • Go to the Releases page

  • Click on the Draft a new release button image

  • Create the Tag number (release version)

image

  • Add the release tile (match the tag version number)

image

  • Add the release notes, use the following headers:

    What's New

    - [Add text here]
    

    What Changed

    - [Add text here]
    
  • Ensure the Set as the latest release option is selected

image

  • Click the Publish release button

image

Note A release action fires the Build and Release of the API clients (ruby, typescript, and python) executable to the appropriate registries. These are the same clients that were generated previously locally.

Post-Release