-
Notifications
You must be signed in to change notification settings - Fork 36
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
NPM distribution #561
Comments
Let me know when you are getting close and I can sign up for the NPM Token |
I haven't tested it yet but I've written the code. I'll do some sample runs to check my logic tomorrow. |
I also realised my list of 6 platforms is a bit aggressive; 32-bit windows is probably far more common than ARM windows (and ARM windows has emulation built-in). I'll adjust that tomorrow as well. |
The branch is ready, I have tested it about as much as I can without having it on NPM (I've run the postinstall script with forced platform settings, but it's hard to do actual testing on other platforms from source). Do you want me to do docs before I open the PR? |
hmm, if you can just give a basic overview of docs in the PR so I can add it when I rework the site that should be fine. |
I've written basic docs but I just realised my approach of minimal disruption - I put everything in an |
I decided to double-check my scripts on a windows VM, and I'm glad I did, because they didn't work quite how I intended 😅 I was over-optimising for performance by trying to have the direct binary linked, but NodeJS makes that difficult. So I've swapped to a NodeJS wrapper that then spawns the executable - slower, but far more reliable and compatible cross-platform. |
As a JavaScript developer, I'd like to use changie but it's not available as a peer of other JavaScript tooling through NPM. JavaScript projects generally only require
npm
to be installed on the system, everything else (even binary executables) are installed through NPM packages.Transferred from #550
Where we've landed in the discussion is I will contribute some JS scripts and initial config. The bulk of this task is adding a step to
release.yml
that collects the archive binaries for distribution. To keep the size of the npm package down, I'm going to exclude the386
builds and just ship the 6 major OS/Arch combinations:dist/changie_darwin_arm64/changie
dist/changie_darwin_amd64_v1/changie
dist/changie_linux_arm64/changie
dist/changie_linux_amd64_v1/changie
dist/changie_windows_arm64/changie.exe
dist/changie_windows_amd64_v1/changie.exe
To achieve this, I need to do a few things.
dist/artifacts.json
and collect the required binaries (the paths above cannot be relied on)Run GoReleaser
step in the release github actionpackage.json
and include it to the list of replacements in.changie.yaml
configThe text was updated successfully, but these errors were encountered: