Closed ppodevlabs closed 1 year ago
Please correct me if I understood wrong. In the configuration, you can use the lifecycle scripts and one those that might satisfy your usecase could be
"scripts": {
"posttag": "git push origin main"
},
Ref: Lifecycle scripts
Yes, I think the lifecycle script is the way to go here.
Note that the scripts
block there is different to the npm scripts block - it should go inside the commit-and-tag-version
stanza:
// package.json
{
....
"commit-and-tag-version": {
"scripts": {
"posttag": "git push origin main"
}
}
}
I'll close this as I think the lifecycle scripts support this use case - feel free to reopen if they don't work for you.
@TimothyJones - when using the scripts, does it support any sort of variable interpolation? I'd like to run something like this to push the commit & tag simultaneiously
git push --atomic origin main <tag-that-was-just-created>
I don’t think so, but it would be pretty easy to (eg) check the most recent tag and do this
In order to integrate with CI environments it would be nice if there is an option to push automatically the tags and changelog generated so we do not have to do extra steps to push the information.