-
Notifications
You must be signed in to change notification settings - Fork 414
Package action and do not checkin node_modules in any branch #5
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
Conversation
``` | ||
|
||
```bash | ||
$ npm prune --production | ||
$ git add node_modules | ||
$ git commit -a -m "prod dependencies" | ||
$ git push origin releases/v1 | ||
``` | ||
|
||
Your action is now published! :rocket: | ||
|
||
See the [versioning documentation](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md) |
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.
I realized this versioning doc needs to get rewritten in light of this. Will do that next and update this link.
thanks @joshmgross will iterate with more changes as we get more feedback. |
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.
This looks great to me - a nice, simple addition 🙌 The only suggestion I'd make is that further explanation of the reason this is necessary wouldn't hurt. Something like:
To run your code, GitHub Actions needs all your dependencies' code to be available. This packaging script compiles the code into one file that can be checked in to Git, enabling fast execution and preventing the need to check in
node_modules
.
Can certainly be left for another PR if you're looking to 🚢 this!
We likely want to update the default workflow We point the We almost may want to look into a step in that workflow that ensures there are no unstaged changes after |
#7 for @JasonEtco suggestion. Will make this improvement in next PR |
@thboop - good catch. I left that because this just has master but also because I opened #6 ... I got feedback from @jeffmcaffer and I want to close on that and update the toolkit versioning doc. He had the same instinct about the question I asked today about it being a little nerve wracking to merge and it's live (as opposed to merge, validate and then explicitly go live with tag). hmmm |
Change actions trigger from push to pull request
Checking in node_modules causes many problems even if it's in a distribution branch. There's no way to ignore just dev dependencies and it's painful to work in master and merge down but keep two different working models between the branches.
ncc has solved this and also works with typescript (even though this template is just js)