Example: tags without releases
Example: tags without releases
Mossgrove maintains mossgrove/schema-tools, a command-line tool. Nobody publishes releases on
GitHub there: a CI run builds the tool, tags the commit, v0.9.3, and uploads the build somewhere
else. The team still wants a line in #schema-tools when a new version exists.
How the team works
The CI run pushes the tag. Nobody writes release notes on GitHub, so there is nothing to publish there, and the version exists only as a tag.
What appears on GitHub
A tag, and nothing else. A tag carries a name and a commit. It has no title, no notes and no pre-release box, and that decides what a message about it can say.
The rule
- Which repository?
mossgrove/schema-tools. - Where should it post? The Slack workspace and
#schema-tools. - Which template? Use the default.
- What should it watch?
- Pushed tags: on. For a repository that has tags and no releases, the wizard switches it on by itself and says why.
- Published releases: it can stay on. As long as nobody publishes a release, it never fires, and the day somebody does, the rule is ready for it.
- Only tags matching:
v*, so that a tag the CI sets for other reasons, such asbuild-1842, stays out. - Include pre-releases: off. A tag is a pre-release when a marker follows its version
number,
v1.0.0-beta.2for example; Pre-releases lists them.
What arrives in the channel
About ten minutes after the tag is pushed, one line arrives: the repository was tagged v0.9.3,
with a link to the tag on GitHub. No notes, because a tag has none.
The wait is on purpose. If somebody publishes a release for the same tag in those minutes, the release is announced instead, with its notes, and the line about the tag is dropped, so the version is announced once.
Moving to releases
When the team starts writing notes, it publishes a release for the tag, by hand or from the CI run. Nothing in the rule has to change: Published releases announces it, and the release replaces the tag line as described above. Once every version has a release, Pushed tags can be switched off.
What can go wrong
- More than three tags in one push are reported for none of them. That is GitHub's rule, not chronik's: GitHub creates no event for such a push, so there is nothing to receive and nothing to repair later. A CI run that sets several tags at once pushes them three at a time or fewer. Tags, and one case GitHub does not report explains it in full.
- A tag deleted and pushed again under the same name is a new tag for GitHub and announced again.