feat: add include-hidden-files input
#137
Open
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.
The Problem
Hidden files and directories (e.g.
.well-known) are unconditionally excluded from the tar archive. There is no way to include them. (#129)The Solution
Add an
include-hidden-filesinput (defaultfalse) that skips the--exclude=.[^/]*pattern when set totrue..gitand.githubare always excluded regardless. Test coverage added for the new option.I think this is the right approach rather than #134. Keep the default behavior safe, and give a sane option to users who know what they're doing. It was safe enough for upload-artifact, it should be safe enough here.
Context
actions/upload-artifactintroduced hidden file exclusion and a correspondinginclude-hidden-filesoption in v4.4.0. This action adopted the same exclusion behavior in its tar step but never added the equivalent option. This PR closes that gap.The only sane workaround without this option is to drop this action, manually create the tar, and hand it to
upload-artifactdirectly. See expressjs/expressjs.com#2173 for an example.