-
Notifications
You must be signed in to change notification settings - Fork 43
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
outputs.version is set only if commit is true #94
Comments
Is that how you access |
With the following workflow: name: Version Bump
concurrency:
group: bump
on:
push:
jobs:
bump:
runs-on: ubuntu-latest
env:
CHANGELOG_INCREMENT_FILENAME: ${{ github.workspace }}/INCREMENT.md
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- id: bump
name: Create bump and changelog
uses: commitizen-tools/commitizen-action@master
with:
push: false
commit: false
changelog_increment_filename: ${{ env.CHANGELOG_INCREMENT_FILENAME }}
- id: envprint
name: Print Env
run: |
printenv
echo "Step Output: ${{ steps.bump.outputs.version }}"
- id: release
name: Create release
if: steps.bump.outputs.version != env.PREVIOUS_REVISION
run: |
echo "${{ steps.bump.outputs.version }}" The job output shows the following environment variable/output (truncated for brevity): PREVIOUS_REVISION=0.1.0
REVISION=0.1.0
Step Output: 0.1.0 Additionally, the The generated changelog does show the bump, but none of the outputs reflect that: ## 0.1.1 (2024-12-23)
### Fix
- **test**: check for bump update
## 0.1.0 (2024-12-09) |
I can reproduce this, unable to use commitizen-action to bump the semver without commit: true |
I can reproduce this also. I suspect this is because when nothing is committed, the bump is detected correctly (for example I can see a couple of potential fixes for this:
I'm looking to build a workflow where commits to |
For the folk still having this issue, I'm curious whether changing the reference to |
I have a workflow where I'm relying solely on the git history for version updates (no file changes).
You can turn off any file updates or other git changes by writing:
... and you get the expected output:
Unfortunately, this doesn't update
outputs.version
, leaving it at the previous version (0.0.0
). This means I have to setcommit: true
, which disturbs the in-runner git state, which slightly complicates creation of releases (although in all honesty I probably should have done that anyways...).The text was updated successfully, but these errors were encountered: