gh-action-bump-version
gh-action-bump-version copied to clipboard
How to get the new version output for the next step?
Currently have the following step:
- name: "Automated Version Bump"
uses: "phips28/gh-action-bump-version@master"
id: version-bump
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
target-branch: "main"
commit-message: "CI: bumps version to {{version}} [skip ci]"
major-wording: "MAJOR"
patch-wording: "patch,fix"
default: minor
but steps.version_bump.outputs.newVersion and steps.version_bump.outputs.version are both undefined
@sebastiangug looks like there's a newTag field? https://github.com/phips28/gh-action-bump-version/blob/master/action.yml#L70
Actually newTag always seems to be blank :(
I don't know why this isn't work after doing some digging. Looking at other actions they're using a different approach e.g. https://github.com/marvinpinto/actions/blob/05a5fd79e119b74bf8fa909a7ecb52bef9aaf1da/packages/automatic-releases/src/main.ts#L319 by using import * as core from '@actions/core';
change the id from version-bump to version_bump, then use steps.version_bump.outputs.newTag