This page describes the release processes. It's inspired from the Prometheus release process
We use Semantic Versioning.
The current flow is to merge new features and bugfixes into the main branch.
As we are in early stage of the project, we don't intend to maintain previous version. Only the last version will be patched if we estimate it requires an urgent patch that cannot wait for the next minor release.
We are using dependabot to keep up to date our dependencies (of Go or npm).
In case you would like to update manually the dependencies :
make update-go-deps
git add go.mod go.sum
git commit -m "Update Go dependencies"
make update-npm-deps
git add ./ui/package-lock.json ./**/package.json
git commit -m "Update npm dependencies"
Note: in case you feel it, you can also upgrade the npm dependencies to their latest release (major or minor)
with make upgrade-npm-deps
You should start to create a branch that follows the pattern release/v<X.Y>
. Release candidates and patch releases
for any given major or minor release happen in the same release/v<major>.<minor>
branch. Do not
create release/<version>
for patch or release candidate releases.
-
Do this in a proper PR pointing to the release branch as this gives others the opportunity to chime in on the release in general and on the addition to the changelog in particular.
-
Update the file
VERSION
with the new version to be created. -
Update the file
CHANGELOG.md
:
make generate-changelog
Note: it will generate a first changelog version based on the git history. You should review what has been generated. Error can happen ;)
- Entries in the
CHANGELOG.md
are meant to be in this order:
[FEATURE]
[ENHANCEMENT]
[BUGFIX]
[BREAKINGCHANGE]
As we have many libraries we publish, it's better if you also put a clear indication about what library is affected by these changes.
- Update the different
package.json
with the corresponding version:
make bump-version
Tag the new release via the following commands:
git checkout release/v<version_to_be_replaced>
make tag
git push origin v<version_to_be_replaced>
Signing a tag with a GPG key is appreciated, but in case you can't add a GPG key to your Github account using the
following procedure, you can replace
the -s
flag by -a
flag of the git tag command to only annotate the tag without signing.
Once a tag is created, the release process through the GitHub Actions will be triggered for this tag.
The Github releases will be created automatically by the GitHub Action triggered. Hopefully you will find the accurate changelog there. It won't hurt if you check quickly if it does not miss anything there.
Occasionally, it is helpful to test a packaged version of the UI to validate specific functionality before cutting a
real release. Where there are difficulties doing this via tools like npm link
and npm pack
because of complexities
with workspaces, a maintainer can create a "snapshot" release of the UI.
- DO NOT merge snapshot branches into
main
. They are intended only as a tool for testing. - DO NOT recommend using snapshot branches in production code. They are intended to be ephemeral for testing purposes.
The creation of snapshots is automated by Github actions based on branch naming schemes.
- Create a branch following the naming scheme
snapshot/tag-name
(e.g.snapshot/theme-updates
) with the changes you want to test. Thetag-name
should be short and kebab-case because it will be used as part of a version name and tag name in npm. - Github actions will build the UI and release a version named
0.0.0-snapshot-tag-name-SHA
at a tag namedsnapshot-tag-name
wheretag-name
comes from your branch name andSHA
is a short version of the git sha for the latest commit on the branch.- We use
0.0.0
as the version prefix to keep snapshots at the bottom of the npm versions UI to avoid confusion for consumers of the package. This also helps differentiate snapshots from the concept of prereleases, which we do not currently provide, but may add in the future.
- We use
- Github actions will release a new version with the latest sha each time you push to the snapshot branch.
- Install the snapshot branch for all relevant packages using the
snapshot-NAME
tag ( e.g.npm install --save-exact @perses-dev/core@snapshot-theme-updates
). Recommend using--save-exact
to avoid inconsistencies with how snapshot version names may match using^
.
- Delete the branch.
- Github actions will automatically remove the tag from npm. The version will still show up in the "version history" section of npm.