googleapis / release-please-action

automated releases based on conventional commits
Apache License 2.0
1.64k stars 207 forks source link

`skip-github-pull-request` not adding tag or creating release #906

Closed danielloader closed 9 months ago

danielloader commented 9 months ago

TL;DR

It's entirely possible this is desired behaviour, but the action isn't creating a release either despite the explicit skip-github-release: false.

If there's no scope for this project to skip the pull requests but also keep making releases/pushing tags please close this issue.

Expected behavior

Expected the action to:

Additionally, but optionally, creating the github release at the same time if desired.

Observed behavior

The action is triggered successfully on PR being merged but no mutation of the repository is observed.

Action YAML

on:
  push:
    branches:
      - main

permissions:
  contents: write
  pull-requests: write

name: release-please

jobs:
  release-please:
    runs-on: ubuntu-latest
    steps:
      - uses: google-github-actions/release-please-action@v4
        id: release
        with:
          token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
          release-type: simple
          skip-github-pull-request: true
          skip-github-release: false

Log output

Run google-github-actions/release-please-action@v4
✔ Looking for latest release on branch: main with prefix: 
❯ Fetching merge commits on branch main with cursor: undefined
❯ Found latest release pull request: 26 version: 0.0.9
❯ Fetching releases with cursor undefined
❯ found release for  Version {
  major: 0,
  minor: 0,
  patch: 9,
  preRelease: undefined,
  build: undefined
}
❯ found release for  Version {
  major: 0,
  minor: 0,
  patch: 8,
  preRelease: undefined,
  build: undefined
}
❯ SHA not found in recent commits to branch main, skipping
❯ found release for  Version {
  major: 0,
  minor: 0,
  patch: 7,
  preRelease: undefined,
  build: undefined
}
❯ SHA not found in recent commits to branch main, skipping
❯ found release for  Version {
  major: 0,
  minor: 0,
  patch: 6,
  preRelease: undefined,
  build: undefined
}
❯ SHA not found in recent commits to branch main, skipping
❯ found release for  Version {
  major: 0,
  minor: 0,
  patch: 5,
  preRelease: undefined,
  build: undefined
}
❯ SHA not found in recent commits to branch main, skipping
❯ found release for  Version {
  major: 0,
  minor: 0,
  patch: 4,
  preRelease: undefined,
  build: undefined
}
❯ SHA not found in recent commits to branch main, skipping
❯ found release for  Version {
  major: 0,
  minor: 0,
  patch: 3,
  preRelease: undefined,
  build: undefined
}
❯ SHA not found in recent commits to branch main, skipping
❯ found release for  Version {
  major: 0,
  minor: 0,
  patch: 2,
  preRelease: undefined,
  build: undefined
}
❯ SHA not found in recent commits to branch main, skipping
❯ found release for  Version {
  major: 0,
  minor: 0,
  patch: 1,
  preRelease: undefined,
  build: undefined
}
❯ SHA not found in recent commits to branch main, skipping
❯ found 2 possible releases. [
  Version {
    major: 0,
    minor: 0,
    patch: 9,
    preRelease: undefined,
    build: undefined
  },
  Version {
    major: 0,
    minor: 0,
    patch: 9,
    preRelease: undefined,
    build: undefined
  }
]
✔ Building releases
✔ Building strategies by path
❯ .: simple

Additional information

Previous builds have been success with skip-github-pull-request: false flag being left as default, to explain why there's values up to v0.0.9.

I am using a PAT to avoid the github limitation of not triggering subsequent jobs using the default GITHUB_TOKEN to write back to the repository.

The PAT has full repository read/write, and package write scopes.

This is an attempt to remove the release PR part of the workflow but retain the other part of the functionality, namely creating tags automatically on commit message prefixes being pushed to main.

chingor13 commented 9 months ago

Are you trying to skip a release-please PR completely? If so, that's not what the skip-github-pull-request input is for. That input is so that you can separate the steps of tagging releases for a merged release-please PR from the creation of the release-please PR.

In my test repo, I separated the steps (https://github.com/chingor13/release-please-playground/blob/62a780d6a2de961f7b9633f14982391049aa3b4b/.github/workflows/rp.yml) and it correctly tagged the release (https://github.com/chingor13/release-please-playground/pull/50#issuecomment-1852471602) when I merged the PR.