googleapis / release-please-action

automated releases based on conventional commits
Apache License 2.0
1.73k stars 213 forks source link

Release-please is adding commits to the changelog that are already added to previous changelog versions #1050

Closed majorgilles closed 3 weeks ago

majorgilles commented 4 weeks ago

Environment details

Steps to reproduce


Config files

.release-please-manifest.json release-please-config.json


YAML of github action

name: 🚀 release-please

on:
  push:
    branches:
      - trunk

permissions:
  contents: write
  pull-requests: write

jobs:
  release-please:
    runs-on: ubuntu-latest
    steps:
      - uses: googleapis/release-please-action@v4
        id: release
        with:
          target-branch: trunk
          token: ${{ SOME_TOKEN }}

          manifest-file: .release-please-manifest.json
          config-file: release-please-config.json
  1. Add a commit message (e.g. starting with "feat: ") and push / merge to trunk
  2. The release please action runs

points 3-5 (having an autorelease: pending label) may not be related to the issue

  1. it finds (apparently) an autorelease: pending branch (despite me having merged the PR - this may be a totally separate issue)

  2. I remove the autorelease: pending label

  3. I rerun the action, which creates a PR this time.

  4. This PR contains commits already released as can be seen here. CHANGELOG.md

Thanks!

majorgilles commented 3 weeks ago

In the end all of my issues were caused by release-please not being able to create github releases, because the PR pattern was not appropriate. It could not create or find matching releases, which caused all of the commits to be considered each time. And since the patterns were wrong, it failed to create the github release after merging the release-please PR. Had to use the release-please cli command with github-release parameter to find this issue.