Skip to content

FailFastSoftpropsGhRelease

action-gh-release should fail fast.

Defined by FailFastActionsRule which supports workflows, actions in the "Default" ruleset along with FailFastUploadArtifact, FailFastPublishUnitTestResults, FailFastPeterEvansCreatePullRequest.

Description

softprops/action-gh-release should be configured to fail the CI when no files are found.

When the action is not configured to fail on missing files, the action step will be successful even when the artifact is not uploaded.

This means the produced releases might be missing important attached artifacts. The release step should fail to alert the maintainer of the broken process.

See the fail_on_unmatched_files input declaration.

In case you're certain this if acceptable behavior, disable this by explicitly setting fail_on_unmatched_files: false.

Compliant example

fail_on_unmatched_files input is specified.

example.yml

on: push
jobs:
  example:
    runs-on: ubuntu-latest
    steps:
      - uses: softprops/action-gh-release@v2
        with:
          fail_on_unmatched_files: true
          files: |
            LICENCE
            executable.exe
            package*.zip

Non-compliant example

fail_on_unmatched_files input is not declared, so it uses the default false value.

example.yml

on: push
jobs:
  example:
    runs-on: ubuntu-latest
    steps:
      - uses: softprops/action-gh-release@v2
        with:
          files: |
            LICENCE
            executable.exe
            package*.zip

  • Line 6: Step[softprops/action-gh-release@v2] in Job[example] should have input fail_on_unmatched_files: true.