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: chocolatey support #3509
feat: chocolatey support #3509
Conversation
Looking into Also I wrote this simple step in a workflow for testing. jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: install chocolatey
run: |
mkdir -p /opt/chocolatey
wget -q -O - "https://github.com/chocolatey/choco/releases/download/${CHOCOLATEY_VERSION}/chocolatey.v${CHOCOLATEY_VERSION}.tar.gz" | tar -xz -C "/opt/chocolatey"
echo '#!/bin/bash' >> /usr/local/bin/choco.exe
echo 'mono /opt/chocolatey/choco.exe $@' >> /usr/local/bin/choco.exe
chmod +x /usr/local/bin/choco.exe
env:
CHOCOLATEY_VERSION: 1.2.0 After that it's just a matter of using |
I made a repository with an example: https://github.com/faabiosr/rand-beer |
This is looking VERY good so far! For the push part, I think we can check if chocolatey is installed and run it, or return a amazing work, thank you! |
c0c32b0
to
d378e3c
Compare
@caarlos0 During this week I will finish all the implementation of this functionality, thanks for the support. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking good!
we should also add docs, and I think we can release goreleaser to chocolatey as well
Codecov Report
@@ Coverage Diff @@
## main #3509 +/- ##
==========================================
- Coverage 84.27% 83.99% -0.28%
==========================================
Files 114 116 +2
Lines 9338 9581 +243
==========================================
+ Hits 7870 8048 +178
- Misses 1191 1239 +48
- Partials 277 294 +17
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
All changes made, if you want to take a look in https://github.com/faabiosr/rand-beer/actions/runs/3395654844/jobs/5645812260, you will see the full integration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking very good! Thank you so much!
Made a bunch of comments, let me know what you think!
The Nuspec follows the Nuget/Chocolatey package specification in order to generate the nupkg file.
Generates the chocolatey package structure in order to pack and push to chocolatey repository.
Please let me know if anything else needs to be done. Thanks a lot for the help. 😉 |
Thank you so much @faabiosr ! Merged! |
Yippee, thanks @faabiosr! |
This PR adds support for generating the structure used to pack and push Chocolatey Packages. And will solve the goreleaser#3154 Is not ready for merge yet, but has the main structure, and ready for comments. Accordingly to Chocolatey, in order to build a package, it's necessary a `.nuspec` and `chocolateyinstall.ps1` files at least, having these ones, we could pack and distribute without adding the binary inside the final package and that was implemented here. To complete, will be necessary to define the package build and distribute, however will be required to have Chocolatey installed (Windows Only). One of alternatives that I thought was, publish the files like Scoop and Brew in a separate repository, and there we could use `chocolatey` through [crazy-max/ghaction-chocolatey](https://github.com/crazy-max/ghaction-chocolatey). Chocolatey has a lot of good examples of repositories: https://github.com/chocolatey-community/chocolatey-packages/tree/master/automatic/curl A final compilation of the missing parts: - [x] How to pack and push (chocolatey) - [x] Documentation Sorry for the long description😄 All feedback very welcome! Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This PR adds support for generating the structure used to pack and push Chocolatey Packages. And will solve the #3154
Is not ready for merge yet, but has the main structure, and ready for comments.
Accordingly to Chocolatey, in order to build a package, it's necessary a
.nuspec
andchocolateyinstall.ps1
files at least, having these ones, we could pack and distribute without adding the binary inside the final package and that was implemented here.To complete, will be necessary to define the package build and distribute, however will be required to have Chocolatey installed (Windows Only). One of alternatives that I thought was, publish the files like Scoop and Brew in a separate repository, and there we could use
chocolatey
through crazy-max/ghaction-chocolatey.Chocolatey has a lot of good examples of repositories:
https://github.com/chocolatey-community/chocolatey-packages/tree/master/automatic/curl
A final compilation of the missing parts:
Sorry for the long description😄
All feedback very welcome!