standard-version
standard-version copied to clipboard
Locally minor bump, on Github Actions bugfix
Hi there,
I have the follow issue. When runnen the following command locally, my version is bumped from 1.2.0 to 1.3.0 (which is correct):
npx standard-version --skip.changelog --skip.tag --skip.commit -t @klappert/mobile\@
However, when running the same command in a Github Action, the bump will result is 1.2.0 -> 1.2.1.
My .versionrc.js:
module.exports = {
bumpFiles: [
{
filename: 'package.json',
},
{
filename: 'app.json',
updater: require.resolve('standard-version-expo'),
},
],
};
My commit history:
e5744fe (HEAD -> development, origin/development) fix: try workflow
097a2ee fix: workflow bumping
ac9e61b refactor: added time refactor: added flatlist to optimise performance
2d0b603 added: order list
7f82551 fix: added error message for brute force limit
7e231c8 refactor: added event and tickets graphql properties
8252237 fix: order sorting
0998764 fix: apollo errors when logging in
8e27a9e refactor: added orders query
a8597ad fix: only allow users to be signed in when their email is verified
4fbcae0 feat: email verification for dashboard
fbfafc8 feat: added register screen
1c3bf88 fix: release status android
6a857a6 fix: android rd klappert
18ffde0 fix: added missing flags to eas build command
9153643 fix: also release android
263e120 feat: list of events before scan screen
b7eebd0 refactor: background color menu
e1cb61e (tag: @klappert/[email protected], origin/master, master) chore(release): 1.2.0
as you see, there are some feat:
in there, hence the minor version bump. However, on Github Actions this is skipped apparently and only a bugfix is bumped. How come, on Github Actions, it isn't recognized, whilel locally, it is?
Answer: Github Actions doesn't fetch the commit history by default. Found the answer here:
https://github.com/actions/checkout/issues/439#issuecomment-897977358
Basically, add the following somewhere before npx standard-version
:
git fetch --prune --unshallow
if you're using actions/checkout, use fetch-depth: 0
if you're using actions/checkout, use
fetch-depth: 0
Saved my day! Having similar problem github action not creating the right changelog!