Open gabriel-amyot opened 10 months ago
I found a work arround by dynamicaly setting a different suffix each time, but the number at the end of the suffix stays at 0
name: Bump version
on:
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.merge_commit_sha }}
fetch-depth: '0'
- name: Bump version and push tag
uses: anothrNick/github-tag-action@1.67.0 #https://github.com/anothrNick/github-tag-action
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: false
PRERELEASE: true
PRERELEASE_SUFFIX: pr-${{ github.event.number }}_${{ github.run_id }}_${{ github.run_number }}
DEFAULT_BUMP: patch
Does seem like a bug. I remember the suffix .X in pre-tags being bumped in earlier versions.
Thanks for the response @sbe-arg ,
I think I've figured out the issue
I highly suspect that the problem happens when I use a mutable PRERELEASE_SUFFIX
like i was doing previously
something like:
PRERELEASE_SUFFIX: pr-${{ github.event.number }}
I would assume that the problem happens here when we try to match the pre_tag.
I could try fixing this myself, but I am not sure how to "compile and publish" a github action in order to test my hypothesis.
If you fork edit and point testing to your fork master or branch is the easier way to develop.
Ill review the pr.
It seems you are ontrack
I am not able to publish a second Tag within a PR. It triggers a conflict. The documentation leads to thing that the pre-release sufix is incremented, but it is not in my case.
Is this a bug, or a misconfigured the action?
Output
Action
First PR commit tags correctly, but when I merge a second commit on the PR it fails [0.2.0-pr_8.0] [0.1.0] [0.1.0-PR_7.0] [0.0.1]