Comments (9)
You can have a step which installs commitizen with pip install commitizen
, then run something like:
cz bump --git-output-to-stderr --dry-run | grep 'tag to create:' | grep -Eo '[0-9].+' > CZ_NEXT_VERSION
cat CZ_NEXT_VERSION
Or directly into a github action variable:
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- run: pip install -U commitizen
- name: Next version
id: getnextversion
run: |
export NEXT_VERSION=$(cz bump --git-output-to-stderr --dry-run | grep 'tag to create:' | grep -Eo '[0-9].+')
echo "VERSION=$NEXT_VERSION" >> $GITHUB_OUTPUT
- name: Your NODEJS script
env:
CZ_PRE_NEW_VERSION: ${{ steps.getversion.outputs.VERSION }}
# HERE the commitizen action
Note: I'm on a MAC so the grep
flags might be different
I believe any change done in git will be picked up by commitizen and commit them in the bump
commit. If that's not the case, try doing git add <files you changed>
, at that point cz bump
will definitely pick them up for the cz bump
commit generated.
from commitizen-action.
I'm closing this since my issue has been addressed already by @woile.
Thanks for the help
from commitizen-action.
Interesting, I'm not sure how to solve this issue. The thing is that the action runs on its own docker image.
from commitizen-action.
Interesting, I'm not sure how to solve this issue. The thing is that the action runs on its own docker image.
That would explain it.
So far, a fix I have found is to install the required packages within the same script however, the workflow takes wayy too long when I do this.
from commitizen-action.
Is it a possibility for you to re-write it in python or with coreutils? That's why I'm not a big fan pre_bump_hooks
from commitizen.
from commitizen-action.
Is it a possibility for you to re-write it in python or with coreutils? That's why I'm not a big fan
pre_bump_hooks
from commitizen.
Unfortunately, the scripts aren't portable to python due to tight dependence on the packages.
Is there an alternative to using pre_bump_hooks
you can recommend?
from commitizen-action.
What is your script doing? I'd consider if the step can be done outside commitizen. Which variables do you use from: https://commitizen-tools.github.io/commitizen/bump/#pre_bump_hooks
from commitizen-action.
Which variables do you use from: https://commitizen-tools.github.io/commitizen/bump/#pre_bump_hooks
I only make use of CZ_PRE_NEW_VERSION
.
I'd consider if the step can be done outside commitizen.
Thanks for this, I can already see possible ways I can handle the scripts outside commitizen. The only downside is I'd have a chore: cleanup after bump
commit after each version bump. But I should be able to live with that 😅
from commitizen-action.
You can have a step which installs commitizen with
pip install commitizen
, then run something like....
Thanks @woile I'm going to give this a try and let you know how it goes
from commitizen-action.
Related Issues (20)
- Clarification on how the workflow updates changelog and version HOT 4
- Actor of pushing to branch should be configurable HOT 1
- Container error `fatal: --local can only be used inside a git repository` HOT 9
- Bump failing after upgrade from 0.16.0 -> 0.16.1 HOT 5
- Option for opening a PR instead of pushing directly to branch HOT 6
- options --name to select the commitizen HOT 8
- Reporting a vulnerability HOT 2
- No tag found to do an incremental changelog HOT 2
- Running the action with changelog_increment_filename fails HOT 2
- gpg: signing failed: No secret key HOT 3
- Bump commit in detached HEAD state not being pushed to master branch HOT 1
- How to use pre_bump_hook scripts with this action HOT 1
- [BUG]: Unstaged Changes HOT 8
- Option to specify MANUAL_VERSION HOT 1
- Git output in the changelog increment file
- Action does not find a specified file in version_files HOT 8
- Question: customise change_type_map from toml file
- Run Action from different path
- Bumping when resolving merge conflicts
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from commitizen-action.