Comments (6)
If anyone else finds this issue and were wondering, this is what I ended up with in the end:
name: Bump version
on:
schedule:
- cron: "0 0 * * 0"
workflow_dispatch:
jobs:
bump_version:
runs-on: ubuntu-latest
name: "Bump version and create changelog with commitizen"
steps:
- name: Check out
uses: actions/checkout@v3
with:
fetch-depth: 0
- id: cz
name: Create bump and changelog
uses: commitizen-tools/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
push: false
- name: Print Version
run: echo "Bumped to version ${{ steps.cz.outputs.version }}"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
branch: bump-version-${{ steps.cz.outputs.version }}
title: Bump version ${{ steps.cz.outputs.version }}
# add tag manually, since the PR action does not push tags
- run: |
git push origin --tags
from commitizen-action.
Yes, you have to set this action to not push. And then use this other action to create the pr:
https://github.com/marketplace/actions/create-pull-request
I don't see any issues with this setup, it should work right away. Feel free to ask here if you need help.
from commitizen-action.
I am having the same issue/doubt, I created a temporary branch and trying to push the commitizen diffs, but it isn't working.
- name: Create temporary branch
run: |
git checkout -b create-pull-request/patch main
git push origin create-pull-request/patch
- id: cz
name: Bump and Changelog
uses: commitizen-tools/commitizen-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
changelog_increment_filename: body.md
I'm getting this error:
Pushing to branch...
error: cannot pull with rebase: You have unstaged changes.
error: please commit or stash them.
from commitizen-action.
I think it's a different issue if you are trying to push from this action, but it doesn't. And for that you will have to share the whole action. I cannot see how you have configured the on
key. Or the checkout action.
And again, if what you want is this action not to push, you have to tell it not to push, which I don't see in the snippet, something like this:
- id: cz
name: Bump and Changelog
uses: commitizen-tools/commitizen-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
changelog_increment_filename: body.md
push: false
from commitizen-action.
Thanks for the help! I was able to get something working with:
jobs:
bump_version:
runs-on: ubuntu-latest
name: "Bump version and create changelog with commitizen"
steps:
- name: Check out
uses: actions/checkout@v3
with:
fetch-depth: 0
- id: cz
name: Create bump and changelog
uses: commitizen-tools/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
push: false
- name: Print Version
run: echo "Bumped to version ${{ steps.cz.outputs.version }}"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
branch: bump-version-${{ steps.cz.outputs.version }}
title: Bump version ${{ steps.cz.outputs.version }}
which works to create the bump commit, and automatically open a PR. However, the tag is lost somewhere on the way I think. Do I need to enable some setting to also get the tag pushed to the PR as well?
from commitizen-action.
The tag is there, you can probably add a step and do git tag
and it will be displayed.
For your next step I think you'll have to ask the maintainers of the action peter-evans/create-pull-request
.
I have never seen this behavior so I'm not sure we can help. If you are creating the PR under the same repository, then you can add a new step and just push the tag. If you are creating a PR from a fork... I'm not sure it's possible to make a PR with a tag in it.
I'm closing now, but feel free to continue in a discussion
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
- 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
- Pre-Bump Scripts do not have access to packages installed before using `commitizen-tools/commitizen-action` HOT 9
- 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.