anothrNick / github-tag-action

A Github Action to tag a repo on merge.
MIT License
786 stars 382 forks source link

How to configure github action file with Semantic Version Rules #287

Open qubetools opened 1 year ago

qubetools commented 1 year ago

First of all, I love this workflow, it works really good.

    id: create-tag
    uses: anothrNick/github-tag-action@1.64.0
    env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

I have above code in my version.yml file. I wanted to follow semantic versioning rules to bump version.

For e.g

  1. If my message says fix: some message or fix(some scope): some message then it should trigger a patch version bump

  2. If my message says feat: some message or feat(some scope): some message then it should trigger a minor version bump

Any idea how to configure it?

sbe-arg commented 1 year ago

I assume you are limiting the repo to squash commit and ? How do you restrict the feat fix convention to be allowed or blocked.

If u use rebase what message in the history in diff takes precedence? The last one?

qubetools commented 1 year ago

@sbe-arg

Thanks for reply,

  1. No, I'm not squashed. I'm testing on single commits only for now.
  2. Forcing a commit message in some format is definitely a problem to look on for me. Until I don't have that, DEFAULT_BUMP = patch would be fine for me, I already know how to do it.
  3. Yes the last message in history should take precedence if there are multiple commits.