Skip to content

Improve/automate package.json version bumping on NPM publish & release drafter #1533

@jescalada

Description

@jescalada

As of #1520, our NPM workflow automatically publishes to NPM whenever we publish a GitHub release. However, it relies on us manually bumping the package.jsons and it doesn't check whether this has been done. If the package.json versions aren't bumped (particularly the main @finos/git-proxy version), this can override existing releases or mess up subsequent release-drafter.yml executions.

Describe the solution you'd like
We should at least check whether a package.json version bump has occurred, and fail the workflow if so.

Ideally, we would have some script that runs automatically to bump the versions appropriately, perhaps during the release-drafter.yml step which computes the next semantic version. This could create a PR that bumps all the relevant package.jsons (currently ./package.json and ./packages/git-proxy-cli/package.json), which we then review/merge to trigger the actual GitHub release, which will in turn create a valid NPM release.

If we go with the auto-bumping script/workflow, we still need to check before running the NPM workflow in case someone forgot to merge the generated bump PR.

Also, the Releases.md doc should be updated to reflect the improved flow.

Additional context
#1516 (comment)
#1516 (comment)
#1520

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions