engine icon indicating copy to clipboard operation
engine copied to clipboard

Automate package release with Semantic versioning

Open Ndpnt opened this issue 2 years ago • 2 comments

This PR allows to manually trigger the package release on GitHub and NPM with an appropriate version bump and distribution tag.

Changelog file (based on Keep a Changelog) should be partially maintained manually by adding changes in the appropriate subsection type (Added, Changed, Deprecated, Removed, Fixed, Security) in the Unreleased section. Then the release workflow will automatically generate the proper entry in the changelog and will clean the unreleased section.

To trigger the release :

  • go to the Actions tab
  • select the Release workflow
  • click on the Run workflow dropdown
  • select the Release type
  • then click on the Run workflow button

Capture d’écran 2022-10-18 à 11 14 03

Heavily inspired from Superface.ai release process

Ndpnt avatar Oct 17 '22 13:10 Ndpnt

Note: the release workflow will be available on the Actions tab only when this PR is merged on the main branch.

Ndpnt avatar Oct 18 '22 09:10 Ndpnt

I approved but could not test of course.

When this is done, we should update all instances with the npm version

martinratinaud avatar Oct 18 '22 12:10 martinratinaud

As seen in a synchronous call with @ndpnt, we want to:

  • Make deployment automated and continuous.
  • Use Common Changelog instead of Keep a Changelog.
  • Document this in the CONTRIBUTING.
  • Obtain version number bump from a tag in the title: ## Unreleased [patch] [minor] [major].
    • This will enable learning. Over time, when we have consistent interpretation, we might automate that from other signals from the Changelog.
  • Remove dist-tags management since they are irrelevant in a CD context.

MattiSG avatar Nov 15 '22 15:11 MattiSG

I don't find it relevant to downgrade the version to 0.0.0. This will lead to multiple versions in the VCS having the same version number. I don't think it's a problem if the first published version is 0.16.0 🙂

MattiSG avatar Nov 15 '22 16:11 MattiSG

We want to publish on NPM under the name opentermsarchive.

MattiSG avatar Nov 15 '22 16:11 MattiSG

I expect a conflict will happen on the v0.17.0 tag that has already been added to the repo, it should probably be removed before merging 🙂

MattiSG avatar Dec 06 '22 12:12 MattiSG

I expect a conflict will happen on the v0.17.0 tag that has already been added to the repo, it should probably be removed before merging 🙂

Already removed ;)

Ndpnt avatar Dec 06 '22 13:12 Ndpnt