Skip to content

Missing body_path file causes abort of action even if fallback body has been set #664

@ramonbroox

Description

@ramonbroox

Using:

    - name: Release
      uses: softprops/action-gh-release@v2
      if: startsWith(github.ref, 'refs/tags/v')
      with:
        body_path: pipeline-changes.txt
        body: '----'
        files: |
          App*.exe

When body_path file read is attempted (readFileSync at

export const releaseBody = (config: Config): string | undefined => {
), if the file does not exist it causes an ENOENT exception and crashes the action.

Main README.md states:
💡 When providing a body and body_path at the same time, body_path will be attempted first, then falling back on body if the path can not be read from.

Any exception should be captured and the fallback body used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions