[bug] Only contents of macOS-Application (***.app) get uploaded
What happened?
I tried uploading a macOS-Application (***.app). Instead the contents of the file get uploaded. When I download the artifact I only receive a directory, called "Contents" which typically resides directly inside the app package.
I guess it handles it like a directory, which it technically is, but still kind of an exception.
What did you expect to happen?
I expected the whole app package to be uploaded, not just the contents.
How can we reproduce it?
- name: Upload .app as artifact
uses: actions/upload-artifact@v4
with:
name: macos-bin-files
path: ${{ env.MACOS_APP_RELEASE_PATH }}/***.app
retention-days: 1
Anything else we need to know?
No response
What version of the action are you using?
v4.3.3
What are your runner environments?
macos
Are you on GitHub Enterprise Server? If so, what version?
No response
.app is a directory my friend.
You can still upload, then download to path: something.app. Be aware that symlinks are not preserved, so filesize may balloon unless you tar it first (or unless this action is updated with an option to preserve symlinks.
See also #93
Applies to other bundle directories: .dSYM, .rtfd, ... and any single directory provided as input. It would be an improvement if the downloaded zip file would unzip into in a directory of the orignal name.
To users of these directories that masquerade as files on macOS, it's as disruptive to result in a generic "Contents" directory as would be a file artifact that downloaded and unzipped to a file named "File".