upload-artifact icon indicating copy to clipboard operation
upload-artifact copied to clipboard

[bug] Only contents of macOS-Application (***.app) get uploaded

Open maxfornacon opened this issue 1 year ago • 2 comments

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

maxfornacon avatar Jun 21 '24 12:06 maxfornacon

.app is a directory my friend.

sanjacob avatar Aug 15 '24 11:08 sanjacob

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.

sanjacob avatar Aug 15 '24 11:08 sanjacob

See also #93

joeyparrish avatar Apr 09 '25 16:04 joeyparrish

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".

jpmhouston avatar Jun 01 '25 18:06 jpmhouston