-
Notifications
You must be signed in to change notification settings - Fork 9
ci: use standard-version to generate new version from conventional commits #33
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
Conversation
Cargo.lock
Outdated
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.
This diff arose due to running cargo update
, which I ran while experimenting with publishing a crate. While not strictly related to this PR, it's worth keeping.
@@ -1,7 +1,7 @@ | |||
[package] | |||
name = "tree-sitter-gitcommit" | |||
description = "gitcommit grammar for the tree-sitter parsing library" | |||
version = "0.0.1" | |||
version = "0.2.0" |
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.
I had to manually bump this version to match the version in package.json. scripts/update-cargo-version.js
will handle version bumps.
@@ -0,0 +1,31 @@ | |||
/// @ts-check | |||
|
|||
const versionPattern = /[ \t]*version\s*=\s*"([^"]+)"/; |
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.
Using a regex is faster and easier to understand than parsing and patching the entire abstract syntax tree of the Cargo.toml document.
d3e6b14
to
a173d77
Compare
This commit adds a local workflow for creating a git tag for a release. Here's the proposed workflow: `npm run prepare-release` will run `standard-version`. `standard-version` bumps the versions in `package.json` and `Cargo.toml` and adds an autogenerated entry to `CHANGELOG.md`, then commits those changes and tags them with the new version. You can safely test this workflow locally. This tooling augments the new github workflows for gbprod#30: you can associate a new release with the generated tags, or you could trigger the package-publishing workflows ```yaml on: push: tags: - 'v*.*.*' ```
a173d77
to
5ff5a6e
Compare
Thanks for your PR! |
9093562
to
adf879c
Compare
Hi @SKalt !
|
This PR adds a local workflow for creating a git tag for a release. Here's the proposed workflow:
npm run prepare-release
will runstandard-version
.standard-version
bumps the versions inpackage.json
andCargo.toml
and adds an autogenerated entry toCHANGELOG.md
, then commits those changes and tags them with the new version. You can safely test this workflow locally.This tooling augments the new github workflows for #30 : you can associate a new release with the generated tags, or you could trigger the package-publishing workflows