googleapis / release-please-action

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

Use of "Release-As:" in commit #952

Open MxNxPx opened 5 months ago

MxNxPx commented 5 months ago

TL;DR

Per the docs, previously I could force a version by adding Release-As: 0.2.0 somewhere in the body of the commit message used in the squash-merge to main regardless of other content in the message. Now it seems to only work if Release-As: 0.2.0 is not accompanied by other Github things like co-authors or perhaps just any presence of --- in the commit message.

Expected behavior

The GHA workflow run would create/update the release-please PR with the version provided in the Release-As: line.

Observed behavior

It does not set the provided version.

Action YAML

on:
  push:
    branches:
      - main

name: release-please-workflow

jobs:
  tag-new-version:
    permissions: write-all
    runs-on: ubuntu-latest
    outputs:
      release_created: ${{ steps.release-flag.outputs.release_created }}
      release_tag: ${{ steps.release-tag.outputs.release_tag }}
    steps:
      - name: Create Release Tag
        id: tag
        uses: google-github-actions/release-please-action@v4.0.2
      - id: release-flag
        run: echo "release_created=${{ steps.tag.outputs.release_created || false }}" >> $GITHUB_OUTPUT 
      - id: release-tag
        run: echo "release_tag=${{ steps.tag.outputs.version || false }}" >> $GITHUB_OUTPUT 
      - id: release-debug
        run: echo "$GITHUB_CONTEXT"

  publish-release:
    needs: tag-new-version
    if: ${{ needs.tag-new-version.outputs.release_created == 'true'}}
    runs-on: ubuntu-latest
    steps:
      - id: publish-debug
        run: echo "$GITHUB_CONTEXT"
      - name: Publish Release Artifact
        id: echo-release
        run: echo "RELEASE ARTIFACT WILL BE CREATED AT THIS POINT"

Log output

no useful log info

Additional information

workflow: https://github.com/MxNxPx/quick-test/blob/main/.github/workflows/release-workflow.yaml

commits to main: https://github.com/MxNxPx/quick-test/commits/main/