semver: fatal: tag 'project-name-0.1.0' already exists

Hi guys,

fatal: tag 'project-name-0.2.0' already exists
    at ChildProcess.exithandler (child_process.js:383:12)
    at ChildProcess.emit (events.js:[40](https://github.com/***
    check_suite_focus=true#step:5:41)0:28)
    at maybeClose (internal/child_process.js:1088:16)
    at Socket.<anonymous> (internal/child_process.js:446:11)
    at Socket.emit (events.js:400:28)
    at Pipe.<anonymous> (net.js:686:12)

this problem always happens in github actions, even though I do a git fetch --tags before

env:
   GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
    - uses: actions/checkout@v2
      with:
          fetch-depth: 0
          token: ${{ secrets.GH_API_TOKEN }}

    - name: Cache (node_modules)
      uses: ./.github/custom-actions/cache-node-modules
      with:
          cache-version: ${{env.CACHE_VERSION}}

    - name: Setup git user to "🤖 github-actions bot"
      shell: bash
      run: git config user.email "<>" && git config user.name "🤖 github-actions[bot]" && git fetch --tags

   - name: version
      run: nx affected --target=version --releseAs=minor

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 17 (6 by maintainers)

Most upvoted comments

I had the same issue and I noticed that merging the release PR with squash instead of merge commit was breaking the link between tag and the main branch, can this be the cause?