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

Installing extra plugin #168

Closed
johngeorgewright opened this issue Mar 22, 2021 · 10 comments · Fixed by #170
Closed

Installing extra plugin #168

johngeorgewright opened this issue Mar 22, 2021 · 10 comments · Fixed by #170
Labels

Comments

@johngeorgewright
Copy link

If I were to use an extra plugin that this action doesn't use, by default, it does not install it. Is this expected? Feels like this action could install all plugins defined.

@codfish
Copy link
Owner

codfish commented Mar 22, 2021

Can you explain the expected input and result? You want to list 1 or more non-standard plugins that you're using in your config and have the action install those for you right?

can you share what you've been trying so far to see what you'd expect to work? Maybe share a link or some code snippets?

@MrSwitch
Copy link

non-standard plugins

I was wondering the same, would it be possible to automatically install even only the official plugins which aren't bundled in semantic-release, this would save having to include them in a projects devDependencies.

codfish added a commit that referenced this issue Apr 3, 2021
Allows users to install non-standard plugins and shareable
configuration packages for use in their `plugins` and `extends`
without having the install those dependencies in their own
applications.

Closes #168
codfish added a commit that referenced this issue Apr 3, 2021
Allows users to install non-standard plugins and shareable
configuration packages for use in their `plugins` and `extends`
without having the install those dependencies in their own
applications.

Closes #168
codfish added a commit that referenced this issue Apr 3, 2021
Allows users to install non-standard plugins and shareable
configuration packages for use in their `plugins` and `extends`
without having the install those dependencies in their own
applications.

Closes #168
codfish added a commit that referenced this issue Apr 3, 2021
Allows users to install non-standard plugins and shareable
configuration packages for use in their `plugins` and `extends`
without having the install those dependencies in their own
applications.

Closes #168
codfish added a commit that referenced this issue Apr 3, 2021
Allows users to install non-standard plugins and shareable
configuration packages for use in their `plugins` and `extends`
without having the install those dependencies in their own
applications.

Closes #168
codfish added a commit that referenced this issue Apr 3, 2021
Allows users to install non-standard plugins and shareable
configuration packages for use in their `plugins` and `extends`
without having the install those dependencies in their own
applications.

Closes #168
codfish added a commit that referenced this issue Apr 3, 2021
Allows users to install non-standard plugins and shareable
configuration packages for use in their `plugins` and `extends`
without having the install those dependencies in their own
applications.

Closes #168
codfish added a commit that referenced this issue Apr 3, 2021
Allows users to install non-standard plugins and shareable
configuration packages for use in their `plugins` and `extends`
without having the install those dependencies in their own
applications.

Closes #168
@codfish
Copy link
Owner

codfish commented Apr 3, 2021

@johngeorgewright @MrSwitch hey guys, would you mind testing this before I merge? I don't have a real use case leveraging additional plugins. #170

To summarize: I've added an additional_packages input that will install any npm packages you specify, allowing you to use them in plugins or extends. Here's an example using semantic's apm extension & plugins:

- name: semantic-release
  uses: codfish/semantic-release-action@additional-packages
  with:
    extends: '@semantic-release/apm-config'
    additional_packages: |
      ['@semantic-release/apm@3.0.0', '@semantic-release/git', '@semantic-release/apm-config']
    plugins: |
      ['@semantic-release/commit-analyzer', '@semantic-release/release-notes-generator', '@semantic-release/github', '@semantic-release/apm', '@semantic-release/git']

If you have a config in your repo, that will work too, without needing to specify plugins or extends configuration through inputs.

Be sure to point to this branch when testing: uses: codfish/semantic-release-action@additional-packages.

codfish added a commit that referenced this issue Apr 4, 2021
Allows users to install non-standard plugins and shareable
configuration packages for use in their `plugins` and `extends`
without having the install those dependencies in their own
applications.

Closes #168
@MrSwitch
Copy link

MrSwitch commented Apr 4, 2021

As per comments on #170

It's too easy for things to break by installing the plugins when there is no where to define a version.

I'll be using a npm install --no-save ... step in my implementation of this Github Action. The step would install the semantic-release dependencies which i dont want included in package.json.

Thanks @codfish 🙏

@codfish
Copy link
Owner

codfish commented Apr 6, 2021

@MrSwitch much appreciated! I'll leave the issue open for a little bit to see if we have any change of heart or other perspectives

@joaofnds
Copy link

joaofnds commented Mar 1, 2022

@codfish do you think this could be merged into main?

@codfish
Copy link
Owner

codfish commented Mar 7, 2022

@joaofnds yea, I think it can. Going to look it over to refresh my memory and update it if need be

what @MrSwitch said can be done as well (running npm install in a separate step before semantic), but this PR just essentially runs npm install --no-save [additional_plugins...] for you as a convenience so everything can be done in the same step.

specific versions can be specified directly in the package names provided, i.e.

additional_packages: |
    ['@semantic-release/apm@3.0.0', '@semantic-release/git', '@semantic-release/apm-config']

@slayerjain
Copy link

slayerjain commented Apr 19, 2022

@codfish I'm using this. but I'm getting the following error here.

Any idea about this? bit stuck here..

[2:05:47 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The commit should not trigger a release
[2:05:47 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: docs(readme) : add gitpod option to readme (#108)
[2:05:47 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The commit should not trigger a release
[2:05:47 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analysis of 7 commits complete: minor release
[2:05:47 PM] [semantic-release] › ✔  Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[2:05:47 PM] [semantic-release] › ℹ  Start step "analyzeCommits" of plugin "@semantic-release/exec"
[2:05:47 PM] [semantic-release] › ✔  Completed step "analyzeCommits" of plugin "@semantic-release/exec"
[2:05:47 PM] [semantic-release] › ℹ  The next release version is 0.4.0
[2:05:47 PM] [semantic-release] › ℹ  Start step "verifyRelease" of plugin "@semantic-release/exec"
[2:05:47 PM] [semantic-release] › ✔  Completed step "verifyRelease" of plugin "@semantic-release/exec"
[2:05:47 PM] [semantic-release] › ℹ  Start step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[2:05:47 PM] [semantic-release] › ✔  Completed step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[2:05:47 PM] [semantic-release] › ℹ  Start step "generateNotes" of plugin "@semantic-release/exec"
[2:05:47 PM] [semantic-release] › ✔  Completed step "generateNotes" of plugin "@semantic-release/exec"
[2:05:47 PM] [semantic-release] › ℹ  Start step "prepare" of plugin "@semantic-release/exec"
[2:05:47 PM] [semantic-release] [@semantic-release/exec] › ℹ  Call script set-version 0.4.0
/bin/sh: 1: set-version: not found
[2:05:47 PM] [semantic-release] › ✖  Failed step "prepare" of plugin "@semantic-release/exec"
[2:05:47 PM] [semantic-release] › ✖  An error occurred while running semantic-release: Error: Command failed with exit code [127](https://github.com/keploy/keploy/runs/6079249506?check_suite_focus=true#step:9:127): set-version 0.4.0
/bin/sh: 1: set-version: not found
    at makeError (/github/workspace/node_modules/execa/lib/error.js:60:11)
    at handlePromise (/github/workspace/node_modules/execa/index.js:118:26)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async module.exports (/github/workspace/node_modules/@semantic-release/exec/lib/exec.js:16:11)
    at async prepare (/github/workspace/node_modules/@semantic-release/exec/index.js:54:5)
    at async validator (/action/node_modules/semantic-release/lib/plugins/normalize.js:34:24)
    at async /action/node_modules/semantic-release/lib/plugins/pipeline.js:37:34
    at async /action/node_modules/semantic-release/lib/plugins/pipeline.js:31:3
    at async Object.pluginsConf.<computed> [as prepare] (/action/node_modules/semantic-release/lib/plugins/index.js:80:11)
    at async run (/action/node_modules/semantic-release/index.js:185:3) {
  shortMessage: 'Command failed with exit code 127: set-version 0.4.0',
  command: 'set-version 0.4.0',
  escapedCommand: '"set-version 0.4.0"',
  exitCode: 127,
  signal: undefined,
  signalDescription: undefined,
  stdout: '',
  stderr: '/bin/sh: 1: set-version: not found',
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false,
  pluginName: '@semantic-release/exec'
}
Error: Error: Command failed with exit code 127: set-version 0.4.0
/bin/sh: 1: set-version: not found

slayerjain added a commit to keploy/keploy that referenced this issue Apr 20, 2022
There seems to be a problem with semantic releaser. I've disabled it until we solve it. 

I've also created an issue on the GitHub action that we are using - codfish/semantic-release-action#168 (comment)
slayerjain added a commit to keploy/keploy that referenced this issue Apr 20, 2022
There seems to be a problem with semantic releaser. I've disabled it until we solve it. 

I've also created an issue on the GitHub action that we are using - codfish/semantic-release-action#168 (comment)
@codfish
Copy link
Owner

codfish commented Aug 7, 2022

@slayerjain i know it's been awhile but any chance you remember what you had for your semantic release configuration when you got this error? just specifying it as an additional plugin wouldn't be enough.

https://github.com/semantic-release/exec#usage

what did you have as your config out of curiosity?

codfish added a commit that referenced this issue Aug 7, 2022
Allows users to install non-standard plugins and shareable
configuration packages for use in their `plugins` and `extends`
without having the install those dependencies in their own
applications.

Closes #168
@github-actions
Copy link

github-actions bot commented Aug 7, 2022

🎉 This issue has been resolved in version 1.10.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
5 participants