release-please-action icon indicating copy to clipboard operation
release-please-action copied to clipboard

`outputs.releases_created` has different behavior compared to v3

Open psYifanChen opened this issue 1 year ago • 6 comments

TL;DR

I am working on a monorepo. When in v3 if: ${{ steps.release.outputs.releases_created }} can be used to run a step conditionally. But it doesn't work in v4. Now I need to use if: ${{ steps.release.outputs.releases_created == 'true' }}

Expected behavior

if: ${{ steps.release.outputs.releases_created }} can skip steps.

Observed behavior

Steps should be skipped always run.

Action YAML

on:
  push:
    branches:
      - main
    paths:
      - 'packages/**'

name: release

jobs:
  release-please:
    runs-on: ubuntu-latest
    steps:
      - uses: google-github-actions/release-please-action@v4
        id: release
        with:
          target-branch: main
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
          registry-url: https://npm.pkg.github.com/
      - uses: pnpm/action-setup@v2
        with:
          version: 8
      - run: pnpm i
        if: ${{ steps.release.outputs.releases_created }}
      - run: pnpm run build
        if: ${{ steps.release.outputs.releases_created }}
      - name: publish to registry
        run: pnpm run publish:all
        if: ${{ steps.release.outputs.releases_created }}
        env:
          NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

Log output

No response

Additional information

Maybe this is not a bug, but it's not mentioned in the migration guide. Maybe we can add something about this. Also, manifest-releaser should be updated.

psYifanChen avatar Dec 19 '23 11:12 psYifanChen