googleapis / release-please-action

automated releases based on conventional commits
Apache License 2.0
1.57k stars 202 forks source link

Ruby: missing version.rb file in release #923

Open 0xdbe opened 6 months ago

0xdbe commented 6 months ago

TL;DR

After migration from v3 to v4, Release-Please-Action not found version.rb in a Ruby Gem: file lib//version.rb did not exist

Expected behavior

Using ruby as release type, release please should edit the following files:

Observed behavior

Using ruby as release type, release please edit the following files:

But - lib/<component>/version.rb is not take into consideration

Action YAML

name: Ruby

on:
  push:
    branches:
      - main

permissions:
  checks: write
  statuses: write
  contents: write
  packages: write
  pull-requests: write

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - name: release please
      uses: google-github-actions/release-please-action@v4
      id: release
      with:
        release-type: ruby

Log output

Run google-github-actions/release-please-action@v4
Running release-please version: 16.5.0
✔ Looking for latest release on branch: main with prefix: 
❯ Fetching merge commits on branch main with cursor: undefined
❯ Fetching releases with cursor undefined
⚠ Could not find releases.
❯ found 0 possible releases. []
❯ found 0 possible tags. []
✔ Building releases
✔ Building strategies by path
❯ .: ruby
✔ Looking for latest release on branch: main with prefix: 
❯ Fetching merge commits on branch main with cursor: undefined
❯ Fetching releases with cursor undefined
⚠ Could not find releases.
❯ found 0 possible releases. []
❯ found 0 possible tags. []
✔ Building pull requests
✔ Building strategies by path
❯ .: ruby
✔ Collecting release commit SHAs
❯ release search depth: 400
❯ Fetching releases with cursor undefined
⚠ Could not find releases.
⚠ Expected 1 releases, only found 0
⚠ Missing 1 paths: .
⚠ No version for path .
⚠ Expected 1 releases, only found 0
✔ Collecting commits since all latest releases
❯ commit search depth: 500
❯ Set(0) {}
❯ Fetching merge commits on branch main with cursor: undefined
❯ Backfilling file list for commit: b22db61f488ec58a90fedfc4c3734ae989e7295e
❯ Found 2 files
❯ Backfilling file list for commit: e27eea4f62065e31fabfcce75bd5cb177b61063f
❯ Found 1 files
❯ Backfilling file list for commit: e7e05a193ffe70c318262a7467f2b2ebfd536142
❯ Found 1 files
❯ Backfilling file list for commit: f4211f5e03fc515754762c0ac218c3a841f61528
❯ Found 1 files
❯ Backfilling file list for commit: fa590c3b474c4bfe9fc74807355a3cb4a814573f
❯ Found 1 files
❯ Backfilling file list for commit: f89ba8381f7d39bc82586e65da15cb8a682a9411
❯ Found 2 files
❯ Backfilling file list for commit: af05bcdaa9ad6e3b46ed273363ef207dd57bf8c4
❯ Found 2 files
❯ Backfilling file list for commit: 8ac144c592e2d2a86fe21c02c44cd1e67a6609bd
❯ Found 1 files
❯ Backfilling file list for commit: 9bdd323e458da6932d193c93b065d2a2bfdfe5fa
❯ Found 1 files
❯ Backfilling file list for commit: 6003ec9cdd28d09e231382b0b7a4b7fabd91f5b9
❯ Found 11 files
✔ Splitting 10 commits by path
✔ Building candidate release pull request for path: .
❯ type: ruby
❯ targetBranch: main
❯ commit could not be parsed: f89ba8381f7d39bc82586e65da15cb8a682a9411 Merge pull request #2 from 0xdbe/release-please/bootstrap/default
❯ commits: 9
⚠ No latest release pull request found.
✔ Considering: 9 commits
❯ component: 
❯ pull request title pattern: undefined
✔ Looking for open release pull requests
✔ found 1 open release pull requests.
✔ Looking for snoozed release pull requests
✔ found 0 snoozed release pull requests.
❯ Fetching CHANGELOG.md from branch main
❯ Fetching lib//version.rb from branch main
⚠ file lib//version.rb did not exist
❯ Fetching Gemfile.lock from branch main
❯ Fetching .release-please-manifest.json from branch main
✔ Starting GitHub PR workflow...
✔ Successfully found branch HEAD sha "b22db61f488ec58a90fedfc4c3734ae989e7295e".
✔ Skipping branch creation step...
✔ Got the latest commit tree
✔ Successfully created a tree with the desired changes with SHA 7aeac424e24d062c233b5932b37cc107bc30d8f2
✔ Successfully created commit. See commit at https://api.github.com/repos/0xdbe/foodie/git/commits/cc917052ab3e36db0b0f8d22f1d1dadbcfafc89d
✔ Updating reference heads/release-please--branches--main to cc917052ab3e36db0b0f8d22f1d1dadbcfafc89d
✔ Successfully updated reference release-please--branches--main to cc917052ab3e36db0b0f8d22f1d1dadbcfafc89d
✔ Found existing pull request for reference 0xdbe:release-please--branches--main. Skipping creating a new pull request.
✔ Successfully opened pull request: 1.

Additional information

Configuration file:

{
  "release-type": "ruby",
  "packages": {
    ".": {
      "changelog-path": "CHANGELOG.md",
      "release-type": "ruby",
      "component": "foodie",
      "package-name": "foodie",
      "version-file": "lib/foodie/version.rb",
      "bump-minor-pre-major": false,
      "bump-patch-for-minor-pre-major": false,
      "draft": false,
      "prerelease": false
    }
  },
  "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}

Repository for demonstration purpose: https://github.com/0xdbe/foodie

seuros commented 6 months ago

Seem you have a configuration error !

This one works perfectly: https://github.com/ClosureTree/with_advisory_lock/blob/master/release-please-config.json