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

Unable to sign tags #214

Closed
jamime opened this issue Nov 13, 2020 · 2 comments
Closed

Unable to sign tags #214

jamime opened this issue Nov 13, 2020 · 2 comments

Comments

@jamime
Copy link

jamime commented Nov 13, 2020

In my GitHub Actions, I use crazy-max/ghaction-import-gpg which internally runs

$ git config tag.gpgsign true

however when semantic release tries to create the tag I get the error

[1:28:33 PM] [semantic-release] › ✖  An error occurred while running semantic-release: Error: Command failed with exit code 1: git tag v17.2.1 2c8fbc034892f534dcf4915ff4a1aebd75874fdd
error: Terminal is dumb, but EDITOR unset
Please supply the message using either -m or -F option.
    at makeError (/home/runner/work/repo/repo/node_modules/execa/lib/error.js:58:11)
    at handlePromise (/home/runner/work/repo/repo/node_modules/execa/index.js:114:26)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async tag (/home/runner/work/repo/repo/node_modules/semantic-release/lib/git.js:224:3)
    at async run (/home/runner/work/repo/repo/node_modules/semantic-release/index.js:190:5)
    at async module.exports (/home/runner/work/repo/repo/node_modules/semantic-release/index.js:259:22)
    at async module.exports (/home/runner/work/repo/repo/node_modules/semantic-release/cli.js:55:5) {
  shortMessage: 'Command failed with exit code 1: git tag v17.2.1 2c8fbc034892f534dcf4915ff4a1aebd75874fdd',
  command: 'git tag v17.2.1 2c8fbc034892f534dcf4915ff4a1aebd75874fdd',
  exitCode: 1,
  signal: undefined,
  signalDescription: undefined,
  stdout: '',
  stderr: 'error: Terminal is dumb, but EDITOR unset\n' +
    'Please supply the message using either -m or -F option.',
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}

Because the tag isn't created but the commit succeeds it triggers the job again, repeatedly until I cancel the job.

  "devDependencies": {
    "@semantic-release/changelog": "^5.0.1",
    "@semantic-release/git": "^9.0.0",
    "semantic-release": "^17.2.2"
  },

It would be great if we can support tag signing by passing a message.

@cherryblossom000
Copy link

semantic-release itself, not this plugin, creates the tag:

    await tag(nextRelease.gitTag, nextRelease.gitHead, {cwd, env});

tag is defined here:

/**
 * Tag the commit head on the local repository.
 *
 * @param {String} tagName The name of the tag.
 * @param {String} ref The Git reference to tag.
 * @param {Object} [execaOpts] Options to pass to `execa`.
 *
 * @throws {Error} if the tag creation failed.
 */
async function tag(tagName, ref, execaOptions) {
  await execa('git', ['tag', tagName, ref], execaOptions);
}

As you can see, a lightweight tag is created, which does not support signing I believe.

Maybe open an issue in https://github.com/semantic-release/semantic-release?

@sheerlox
Copy link
Member

@sheerlox sheerlox closed this as not planned Won't fix, can't repro, duplicate, stale Nov 22, 2023
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

3 participants