laverdet / isolated-vm

Secure & isolated JS environments for nodejs
ISC License
2.2k stars 154 forks source link

Support prebuild #366

Closed orgads closed 1 year ago

orgads commented 1 year ago

Simplifies distribution of pre-built binaries.

Fixes #201 Fixes #297

orgads commented 1 year ago

Sample release: https://github.com/orgads/isolated-vm/releases

Until this is accepted, my release can be installed using:

npm install isolated-vm-prebuilt
orgads commented 1 year ago

In order to get it working, you need to create a token here: https://github.com/settings/personal-access-tokens/new

In Repository access, choose the isolated-vm repository, expand Repository permissions -> Contents -> Read and write.

Copy the generated token, then create a secret in the repository here: https://github.com/laverdet/isolated-vm/settings/secrets/actions/new name: UPLOAD_TOKEN Secret: <the copied value>

And you're all set! When you create a release, binary artifacts will be created automatically.

This can be also enabled for tags if you prefer not to manually create Github releases.

alumni commented 1 year ago

@laverdet can you please consider this? The only alternative, vm2 has been discontinued due to security issues.

laverdet commented 1 year ago

Thanks for the contribution. I had a really bad time with precompiled binaries while supporting node-fibers so I resolved not to support them in this project. Maybe prebuild will be easier though.