Introduction
Maintaining a well-organized changelog, releasing a new version of an , then publishing it into a package repository. All these are tedious, repetitive chores that can be automated to save valuable developer time.
In this tutorial, you will learn how to set up tools that do just that. You will walk through the following steps:
- Set up a Github Action to release a new version
- Publish a new SDK version:
- Create a Rubygems account,
- Create a Rubygems API key and store it in GitHub securely
- Set up a GitHub workflow to auto-publish a new SDK version
Prerequisites
This tutorial assumes that you have already developed a functional SDK and pushed it into a GitHub repository.
Release a new version
Owner + Developer: Set up a Github Action to release new SDK versions
To avoid the tedious task of updating the changelog and releasing new versions manually, we recommend using the Github Action . This Action keeps track of code changes since the last release and maintains a pull request with changelog and version changes based on your commit messages. When the time is right to release a new SDK version, all you need to do is merge the pull request.
Follow these steps to set up the Action:
Owner:
- In your Github repository, go to Settings > Actions > General and make sure that the option âAllow Github Actions to create and approve pull requestsâ is checked.
Developer:
- In the root folder of your project, create a directory .github/workflows/. This is where GitHub Action configuration files should always be stored.
- In this directory, create a new configuration YAML file. Name it release-please.yml.
- Copy the following code into your configuration file: