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

feat: add additional_packages input variable #170

Merged
merged 1 commit into from Aug 7, 2022
Merged

Conversation

codfish
Copy link
Owner

@codfish codfish commented 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

Related Issue

#168

@codfish codfish force-pushed the additional-packages branch 2 times, most recently from 68cd6ad to 5ce23f0 Compare April 3, 2021 19:26
@codfish codfish mentioned this pull request Apr 3, 2021
@MrSwitch
Copy link

MrSwitch commented Apr 4, 2021

Thanks @codfish. If we need to explicitly define the packages to install then arguably isn't an npm install step a more intuitive approach?

i.e....

- name: Install extra dependencies
  run: npm i --no-save @semantic-release/apm@3.0.0 @semantic-release/git @semantic-release/apm-config
- name: semantic-release
  uses: codfish/semantic-release-action@additional-packages
  with:
    extends: '@semantic-release/apm-config'
    plugins: |
      ['@semantic-release/commit-analyzer', '@semantic-release/release-notes-generator', '@semantic-release/github', '@semantic-release/apm', '@semantic-release/git']

@codfish
Copy link
Owner Author

codfish commented Apr 4, 2021

@MrSwitch thanks for the review. Nothing stopping you from doing that today. If we come to the conclusion that this doesn't really provide any value I'm fine scraping it. I want to make sure any added functionality is providing real value to users. That being said, I'm also very open to iterating and finding a solution that does help simplify things.

Btw, sorry, I totally meant to respond to your original thoughts on the issue yesterday, but forgot to mention it. I can see the benefit of possibly pre-installing official plugins but my hesitations are around the overhead & unforeseen issues I may run into with maintaining that. This action was meant to be similar to running npx semantic-release in a way, with the added benefit of the direct integration of GitHub Actions, i.e. setting outputs, etc. It's also actually faster with the action if you use the docker image.

I just don't know what weird compatibility issues I might see with maintaining all different versions of those dependencies, keeping those up to date, adding new versions or plugins as they are released, etc. I would rather leave that complexity on the user-side, like semantic-release does today. I'm not totally sold either way though, so I'll keep the issue open ended.

In terms of this change then, do you see any benefit to doing this? If it's current implementation is not ideal in your opinion, is there a way you think it could be improved?

For instance, what if we auto-installed dependencies based on what's specified in plugins and extends? I see flaws in this approach, i.e. redundant if you've already got those deps installed, but still might be more straightforward, no new custom options involved then. Or maybe it's even more confusing...?

@MrSwitch
Copy link

MrSwitch commented Apr 4, 2021

For instance, what if we auto-installed dependencies based on what's specified in plugins and extends? I see flaws in this approach, i.e. redundant if you've already got those deps installed, but still might be more straightforward, no new custom options involved then. Or maybe it's even more confusing...?

I was thinking along these same lines. I certainly agree locking down a version of any dependencies is the wrong thing to do. As such I retract my comment, and what you have before is best all around. As i now feel that running a step npm i --no-save @semantic-release/plugin,... is my preferred choice, and let's me maintain versioning etc...

What I think you have in this github-action is a really good tool. To elaborate on how i intend to use it is to abstract all the things semantic-release does well, tagging and publishing, to a single config. And have package.json's dependencies/devDependencies exclusively focused on the projects development requirements.

Thanks for replying to the original ticket, i know it's a hard slog maintaining open source projects and i thankyou so much for giving this your time. 🙏

@codfish
Copy link
Owner Author

codfish commented Apr 6, 2021

@MrSwitch much appreciated, that's for contributing your time and thoughts!

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 codfish merged commit cbd853a into master Aug 7, 2022
@codfish codfish deleted the additional-packages branch August 7, 2022 19:46
@github-actions
Copy link

github-actions bot commented Aug 7, 2022

🎉 This PR is included 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
Development

Successfully merging this pull request may close these issues.

Installing extra plugin
2 participants