googleapis / release-please-action

automated releases based on conventional commits
Apache License 2.0
1.56k stars 200 forks source link

Release please creating new release PR every time I merge the release PR #1006

Closed AlbertHernandez closed 1 month ago

AlbertHernandez commented 1 month ago

Hi! I am trying to adopt release-please in order to release a npm package. However, what is happening is that everytime I merge the PR that is created by release-please, a new PR is being created

The issue is in this public repository. My configuration is:

release-please.yml

name: 'Release Please'

on:
  push:
    branches:
      - main

permissions:
  contents: write
  pull-requests: write

jobs:
  release-please:
    runs-on: ubuntu-latest
    steps:
      - uses: googleapis/release-please-action@v4
        id: release
        with:
          token: ${{ secrets.PAT_GITHUB_TOKEN }}

release-please-config.json

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

.release-please-manifest.json:

{
  ".": "1.9.0"
}

What I see as a result is:

First, I the release PR is created:

CleanShot 2024-06-08 at 10 22 42@2x

After merging that PR, release-please action runs:

CleanShot 2024-06-08 at 10 23 55@2x

After this finish, it creates again a new release PR with a new version:

CleanShot 2024-06-08 at 10 24 57@2x

I have tried multiple things, also looking other's configuration, changing some options to see if it was related to some specific property... but after investigating for a while I am not being able to make it work correctly :(

Can anyone help me to understand what's happening and how to fix it? Thanks in advance!

AlbertHernandez commented 1 month ago

After more investigation I have there was a conflict between release-please and other action I was using to have the labels of the repo as code.

Since I was not configuring the release-please labels in this IAC, the release it was not working properly, but after adding them started to work.

This was the fix: https://github.com/AlbertHernandez/typescript-library-template/commit/f22b80499a7d539b9b628062fdf03d8109a24d1f

I hope this can help to the next mate that face this issue too