Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
fiianalytics opened this issue Apr 10, 2023 · 0 comments

Comments

@fiianalytics
Copy link

fiianalytics commented Apr 10, 2023

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}"
      }
    ]
  ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant