Skip to content

Automate Version Updates and Tagging in Release Workflow #664

@tbouffard

Description

@tbouffard

Is your technical request related to a problem? Please describe.

Currently, initializing a release (updating version numbers in files and performing Git operations) is a manual process. This increases the risk of errors and requires repository administrator rights, which limits the number of maintainers who can handle it.

Describe the solution you'd like

The goal is to automate this step to reduce errors and allow more maintainers to manage releases. This has been an objective since the first release: #141 (comment).

Ideally, a maintainer would manually trigger the release using a GitHub Actions workflow via workflow_dispatch, entering the version number as currently done. The workflow would then:

  • Update the version numbers in the relevant files
  • Commit the changes
  • Create the tag
  • Push everything to the repository

Since version 0.15.0, we have a script to update the version in files: #650, which will help with this process.

Describe alternatives you've considered

  • The changelog preparation will likely remain manual, which is fine with the current setup.
  • We do not plan to change the entire release mechanism, only to automate the part that is still manual.
  • While there are tools available to handle the whole release process, we prefer not to use them for now.

Additional context

  • The main branch is protected by a ruleset, and we'll need to bypass these restrictions.
  • The creation of the Git tag triggers the subsequent automation workflows (GitHub Actions). The tag push must be done by an account, not with the GH_TOKEN, as this prevents other workflows from triggering (see the GitHub documentation for more details).
  • A service account (bot) could be used to perform these actions.
  • Ideally, the bot should sign both the commits and tags.

Note (not directly related to this topic, but for release in general): for the npm publish, we could now use a token less procedure, see https://docs.npmjs.com/trusted-publishers

Tasks

Setup trusted publishers

Create the bot account

  • ensure it has all permissions to write in the repository, especially on the main branch

Code, configuration and documentation changes

  • create a new workflow to initialize the release
  • update the release procedure to
  • update the changelog prior starting the release.
  • Remove the need to manually run the script and perform the git operations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions