googleapis / release-please-action

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

prerelease not working #925

Open dinjazelena opened 7 months ago

dinjazelena commented 7 months ago

TL;DR

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
        with:
          release-type: python
          version-file: togusa/__init__.py
          prerelease: true
          prerelease-type: beta

Hi, so when i specify prerelease and prerelease type, nothing really happens it just creates regular Release and version bump.

I also get this warning: Unexpected input(s) 'version-file', 'prerelease', 'prerelease-type', valid inputs are ['token', 'release-type', 'path', 'target-branch', 'config-file', 'manifest-file', 'repo-url', 'github-api-url', 'github-graphql-url', 'fork', 'include-component-in-tag', 'proxy-server', 'skip-github-release', 'skip-github-pull-request']

Expected behavior

Create a prerelase with beta added to version

Observed behavior

No response

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
        with:
          release-type: python
          version-file: togusa/__init__.py
          prerelease: true
          prerelease-type: beta

Log output

No response

Additional information

No response

ju-Skinner commented 7 months ago

Hello, I was in the same boat as you. I thought the prerelease was related to the SemVer, but it is for the GitHub Release. meaning that your release will be created as a Draft.

Your error could be resolved following the steps here, which will have you create a manifest-file.

  // when `manifest-release` creates GitHub Releases per package, create
  // those as "Prerelease" releases that have pre-major or prerelease versions.
  // absence defaults to false and all versions are fully Published.
  "prerelease": true

https://github.com/googleapis/release-please/blob/main/docs/manifest-releaser.md?plain=1#L191-L194

dinjazelena commented 7 months ago

Thank u very much for help. But the thing is prerelease set to true in yml workflow wont even create Draft for me. Could u reproduce minimal manifest-file for setting prerelease-type for python project?

mewhhaha commented 4 months ago

We had a similar issue with preleases where there was a field called "versioning" that needed to be set to "prerelease" for our beta prereleases to be working. It seems to be documented in the schema but couldn't find it in the manifest README.