googleapis/release-please-action

After merging a release PR, a release is created but then a duplicate release PR is automatically opened

Opened this issue · 6 comments

TL;DR

When using the release-please action, on triggering a release PR, if I merge in the release PR, a release will get created in the draft format, but a duplicate release PR will get opened

Here's an example of what the .release-please-manifest.json looks like:

{
  ".": "1.0.3"
}

Here's what the release-please-config.json looks like:

{
  "packages": {
    ".": {
      "release-type": "node",
      "draft": true,
      "include-component-in-tag": false
    }
  },
  "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}

Expected behavior

After merging in a release PR, I was expecting a draft release to get created, and no other PR get automatically opened.

Observed behavior

Instead, a duplicate release PR of the one just merged, was getting opened.

Action YAML

name: Run release-please

on:
  push:
    branches:
      - main

permissions:
  contents: write
  pull-requests: write

jobs:
  release-please:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v3

      - name: Use latest release-please action
        uses: google-github-actions/release-please-action@v4
        with:
          token: ${{secrets.GITHUB_TOKEN}}
          config-file: release-please-config.json
          manifest-file: .release-please-manifest.json

Log output

No response

Additional information

No response

I have the same problem.

this is also giving us issues

having the same issue and I think I found the root cause. This happens when you have the draft:true flag set. This is because no git tag is created until the github release is manually published, so release please fails to find the new tag and creates a new PR with exactly the same changes.

I think release please action (or release please) should tag the repo regardless of the value of thedraft flag.

Tried a workaround using skip-github-release option and then generating a release in a followup step, but the same problem occurs. No tag is generated and things break

I'm also having this problem. Another issue is that with draft: true in my release-please-config.json, release please is grabbing every change since I added in release-please, causing incorrect changelogs and incorrect version bumps.

Same issue for me and I can confirm it's due to the missing tag. The action runs after merge, checks for the tags, can't find the "draft tag" (because there's none of course) and then creates another pr with all changes in the changelog since whatever.

See those PRs
Valid: XeroxDev/Loupedeck-plugin-VoiceMeeter#26

Invalid: XeroxDev/Loupedeck-plugin-VoiceMeeter#28

And those runs
Valid: https://github.com/XeroxDev/Loupedeck-plugin-VoiceMeeter/actions/runs/11083474549

"invalid": https://github.com/XeroxDev/Loupedeck-plugin-VoiceMeeter/actions/runs/11083484717