Setup npm package 🚀 #1
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR creates a package.json to publish the project to npm.
Github workflow
I added a workflow file to auto-release and publish to npm. This action can be dispatched from the GitHub website, you simply enter the version like
v1.0.0and it will publish to npm, create a tag and create a new release.To make it work, the repo needs a secret
NPM_TOKENthat can publish to npm. Also, I think that if we are going to push the package as a scoped, the action needs to use theNODE_AUTH_TOKENenv variable instead ofNPM_AUTH_TOKENto pass the token. I tried to publish my first non-scoped package withNODE_AUTH_TOKENbut it kept failing and found out that I needed the other variable (see actions/setup-node#81 (comment))To publish on Wally, there also need to be a secret
WALLY_ACCESS_TOKEN.Darklua setup
I added darklua to be able to use string/path requires. This makes it possible to re-use the package in a lot more Lua environments.
The release workflow automatically builds a
rbxmmodel and a bundled Lua file. Those asset are automatically joined to releases when publishing a version with the GitHub workflow.