-
Notifications
You must be signed in to change notification settings - Fork 3
How to create a release
- Branch from the main
- Create a pull request (PR)
- Clone the PR locally
- Make the necessary code updates to the eMASS API specification file
- eMASSRestOpenApi.yaml
- 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
)
- Ruby (
Run the OpenAPI Generator using Docker to test how the github workflow generate-clients.yml action will behave.
docker pull openapitools/openapi-generator-cli
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 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.
-
Go to the Releases page
-
Click on the
Draft a new release
button -
Create the Tag number (release version)
- Add the release tile (match the tag version number)
-
Add the release notes, use the following headers:
- [Add text here]
- [Add text here]
-
Ensure the
Set as the latest release
option is selected
- Click the
Publish release
button
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.
- Verify that the following emass_client packages were generated and release to the appropriate registries:
- Verify that the latest release version is the one just created
Creating eMASS API clients the easy way