Skip to content

failCmd doesn't get invoked when publishCmd returns non-zero error code #335

Open
@fiianalytics

Description

@fiianalytics

semantic-release-errorlog.log
I'm trying to create a workflow where I should be able to notify on success and failure of publishCmd, but failCmd doesn't get invoked at all when publishCmd returns non-zero error code. Instead the semantic-release crashes with error stack trace.

{
  "ci": false,
  "branches": [
    "test",
    {
      "name": "beta",
      "prerelease": true
    },
    {
      "name": "alpha",
      "prerelease": true
    }
  ],
  "plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    [
      "@semantic-release/changelog",
      {
        "changelogFile": "docs/CHANGELOG.md"
      }
    ],
    [
      "@semantic-release/exec",
      {
        "failCmd": "./fail.py",
        "successCmd": "./success.py",
        "publishCmd": "./deploy.sh \"${nextRelease.version}\"",
        "verifyConditionsCmd": "./verify.py"
      }
    ],
    [
      "@semantic-release/git",
      {
        "assets": [
          "docs/CHANGELOG.md"
        ],
        "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
      }
    ]
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions