-
-
Notifications
You must be signed in to change notification settings - Fork 717
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release automation #95
Release automation #95
Conversation
…1/maplibre-gl-js into release-automation
Bundle size report: Size Change: 0 B
ℹ️ View DetailsNo major changes |
looks awesome, thanks! A few minor things:
|
Co-authored-by: Yuri Astrakhan <[email protected]>
Co-authored-by: Yuri Astrakhan <[email protected]>
Co-authored-by: Yuri Astrakhan <[email protected]>
This should be addressed here maplibre-gl-js/build/version-utils.js Line 57 in 6c315b3
The tag format should be ensured by regular expressions. One more validation there checks if the new version tag is greater than the previous one (using semver library)
The test is here: maplibre-gl-js/build/release-notes.js Line 54 in 6c315b3
The explanation how the relevant parts of changelog is matched is here: maplibre-gl-js/build/release-notes.js Line 26 in 6c315b3
(this is original code from Mapbox)
The workflow has one variant for beta/rc releases and second for regular releases. For beta/rc releases, no release notes are produced. I would suggest to come up with solution for beta release notes in another PR if they are needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a few more minor suggestions - I think it is better to rely on semver library for all parsing/testing, than to use regex - except to test that the semver begins with a v
-- because semver automatically removes it. tags.map(v => v.trim()).filter(v => /^v\d/.test(v)).map(v => semver.validate(v)).filter(v => v)
should work (or something similar).
Agree with your point about beta/release notes.
NODE_AUTH_TOKEN token is configured now. |
Please no beta / rc and other pre-releases. Just semver - and increments - as soon as the release process is fixed. |
@klokan any reason not to automate publishing to NPM for rc/beta versions? |
GitHub workflow for releasing new versions
The logic is split in two jobs
Workflow Description
The workflow is triggered when a tag is pushed or It can also be triggered manually.
After the workflow starts it searches for the most recent version tag (that is a tag with
v*.*.*
format) and uses the version from this tag for the next processing. The version must follow semantic versioning rules.There can be regular version (i.e. 1.13.0) or pre-release (i.e. 1.13.0-rc.1).
In case of regular version the action parses
CHANGELOG.md
and creates release notes based on current and last version. Release notes are not generated for pre-release versions. In case of pre-release versions the github release is marked as pre-release accordingly.The changelog should be updated on every PR - there is a placeholder at the top of the document - and heading should be renamed to the same version which is going to be set in the version tag during release.
Workflow Setup
The workflow expects there is
NODE_AUTH_TOKEN
secret in the repo settings which is used for pushing to npm registry.There are no tags in the maplibre-gl-js repo currently. Initial tags can be setup as follows: