Skip to content

Conversation

@jeparlefrancais
Copy link
Collaborator

@jeparlefrancais jeparlefrancais commented Nov 16, 2023

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.0 and it will publish to npm, create a tag and create a new release.

To make it work, the repo needs a secret NPM_TOKEN that can publish to npm. Also, I think that if we are going to push the package as a scoped, the action needs to use the NODE_AUTH_TOKEN env variable instead of NPM_AUTH_TOKEN to pass the token. I tried to publish my first non-scoped package with NODE_AUTH_TOKEN but 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 rbxm model and a bundled Lua file. Those asset are automatically joined to releases when publishing a version with the GitHub workflow.

@grilme99
Copy link

Sorry about the delay. Thanks for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants