release-please-action icon indicating copy to clipboard operation
release-please-action copied to clipboard

The bump-minor-pre-major option in the workflow file is ignored

Open ChristianIvicevic opened this issue 4 years ago • 3 comments

After trying out the action with the following file

name: Release
on:
  push:
    branches: [main]
jobs:
  release-please:
    runs-on: ubuntu-latest
    steps:
      - uses: GoogleCloudPlatform/release-please-action@v2
        id: release
        with:
          token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
          release-type: node
          package-name: npm-test-package
          bump-minor-pre-major: true

I noticed that every single release starts with v1.0.0 ignoring the bump-minor-pre-major flag. I expected it to start at v0.1.0 as stated in my package.json.

ChristianIvicevic avatar Dec 28 '20 23:12 ChristianIvicevic

@ChristianIvicevic the problem is that Node.js defaults to v1.0.0 if no prior release can be found.

If you create a release pointing to your main branch, with the tag v0.1.0, it will do the right thing.

As a more permanent fix, I was thinking that we should figure out how to make Node.js releases default to the value in the package.json.

bcoe avatar Dec 29 '20 21:12 bcoe

Oh I see - it'd be awesome if that behavior is documented in the readme. Unfortunately I had to start my package at v1.0.0 for the time being. Thanks for the explanation.

At least it hasn't been 72h yet so I can unpublish my package and restart at v0.1.0.

ChristianIvicevic avatar Dec 29 '20 22:12 ChristianIvicevic

This makes the OOBE for a basic, unreleased JS project not so great. I'm still struggling with token errors, but I see in the logs that it wants to start with v1.0.0, when it's at 0.0.1 in the package.json. Tagging a fake release at v0.0.1 doesn't feel right, but maybe that'll work.

fwextensions avatar May 25 '22 02:05 fwextensions