Skip to content
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

feat: enable --prerelease none for CI/CD #1162

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dmyersturnbull
Copy link

@dmyersturnbull dmyersturnbull commented Jun 17, 2024

Sorry for not creating an issue first, but I figured the change was so easy to make.

--prerelease none

When using the GitHub Action, users will probably want to set --prerelease either dynamically or from a dispatch parameter. Without this, redundant commitizen-action calls are needed; e.g.:

- id: cz-prerelease
  name: Create bump and changelog (prerelease only)
  if: ${{ github.event.inputs.prerelease }}
  uses: commitizen-tools/commitizen-action@master
  with:
    github_token: ${{ secrets.PAT }}
    git_name: ${{ steps.gpg.outputs.name }}
    git_email: ${{ steps.gpg.outputs.email }}
    gpg_sign: true
    prerelease: ${{ prerelease }}
    debug: true

- id: cz-release
  name: Create bump and changelog (stable release only)
  if: ${{ ! github.event.inputs.prerelease }}
  uses: commitizen-tools/commitizen-action@master
  with:
    github_token: ${{ secrets.PAT }}
    git_name: ${{ steps.gpg.outputs.name }}
    git_email: ${{ steps.gpg.outputs.email }}
    gpg_sign: true
    # no prerelease
    debug: true

StrEnum

While at it, I also converted Increment and Prerelease into StrEnums, which should be helpful in an IDE. I violated the convention of ALL_CAPS for Prerelease for consistency, but I'm happy to change it.

Edit: gh pr create --fill did something weird!

@dmyersturnbull dmyersturnbull changed the title master feat: enable --prerelease none for CI/CD Jun 17, 2024
@Lee-W
Copy link
Member

Lee-W commented Jun 27, 2024

It sounds like a good improvement to me, but we will need your help to get a CI pass before we can do a thoughtful review. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants