The package.json has an all script that will format, lint, package, and test
all the code in the repo for you. Running npm run all is the best way to get
the repo to a valid state after having made modifications on it.
There is an organization-level, private, repository for a sample app that has the github action registered. For @autometrics-dev members, it is the best way to test regressions on the github action.
For external contributors, reproducing issues comes down to creating a very small repository that has problem-triggering code, and then attaching the action to it. The results of the Workflow run should then speak for itself.
tl;dr
We are using release/v* branches, and moving tags like Docker image tags, that follow the latest relevant (patch|minor) version that's published.
The release management relies on moving tags for Github Actions. This is done,
so users of the actions can always mention the action using the same
autometrics-dev/diff-metrics@v1 name for the action, and they get all the
non-breaking changes for free.
It is also important to leave the ability to target specific versions if some users still want to have non-moving tags or if a regression sneaks in.
This is why we're using the Docker method here to deal with releases.
Each major release will have its own release/vX branch, so that hotfixes can
be applied on the branches even after a new major version is done.
Just as Git Flow, the PRs and development of features happen on main, and
occasionnally gets backported to release/vX branches if relevant.
The PRs for fixes happen on release/vX branches, and if the bug is still
present on main too, it should be ported there as well.
Creating a new major version implies 4 steps:
- create the
release/vXbranch frommain, for example creatingrelease/v3branch. - create a PR to
release/v3that updates thepackage.jsonversion to3.0.0if not done. - create a PR to
mainthat updates thepackage.jsonversion to4.0.0-devif not done. - once the
release/v3PR is merged, create thev3.0.0,v3.0, andv3tags, all pointing to the new commit
When a new PR is merged on a release/vX branch, it MUST bump the minor version or
the patch version in the package.json accordingly.
This version will then get tagged once merged on release/vX, with the exact patch
version it has, e.g. v2.12.99.
Once that tag is created, the new version also pulls all its relevant tags:
v2.12must be moved tov2.12.99, andv2must be moved tov2.12.99