Question: publish canary and version
I'm trying to do lerna publish --canary in my CI/CD
I'm seeing the "number" after "alpha" is not bumped up (look at the 2nd and 3rd are both alpha.1 )
0.1.3-alpha.0+34fcd0a
0.1.3-alpha.1+d9a9ecb
0.1.3-alpha.1+ezacf1c
How can I make sure that everytime the canary publish can bump up the number after alpha ?
0.1.3-alpha.0+{someSHA}
0.1.3-alpha.1+{someSHA}
0.1.3-alpha.2+{someSHA}
0.1.3-alpha.3+{someSHA}
👍 This would be very beneficial for my flow as well. 🤔
I was following this guide: https://johnny.sh/notes/publish-canary-lerna-cicd/ where he proposes using
lerna publish prerelease --canary --exact --yes --dist-tag=$BRANCH --preid=$BRANCH
But for me the version number is always 0 :(
I wound up having to fetch more git history e.g. in github actions:
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.REPO_MACHINE_ACCESS_TOKEN }}
fetch-depth: 0
The version number comes from git describe, which counts the amount of commits from the last tag.