- Install dependencies:
bundle - Install OpenAPI Generator (on macOS:
brew install openapi-generator) - Run tests:
bundle exec rake specorrspec
Run bundle exec rake generate. This will generate the API client from the latest OpenAPI spec and bump the version. The bump defaults to minor; pass major or patch to change it (bundle exec rake "generate[patch]"). Once generated, you should open a PR and merge the changes.
The version that gets published is whatever lib/ynab/version.rb on the main branch says, so publishing is two steps.
- Merge a PR that sets the new version.
bundle exec rake generatedoes this for you. For a release that does not involve re-generating the client, runbundle exec rake "bump_version_number[minor]"(ormajor/patch), which updateslib/ynab/version.rbandGemfile.lockwithout creating a commit or tag. - Run the "Publish" GitHub Actions workflow. This runs the specs and publishes that version to RubyGems, then tags the commit and creates a GitHub release.
The workflow never changes the version itself. If the version in lib/ynab/version.rb has already been released, the workflow fails before publishing anything.