actions / upload-artifact

MIT License
3.26k stars 739 forks source link

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

Open maxfornacon opened 5 months ago

maxfornacon commented 5 months ago

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

sanjacob commented 3 months ago

.app is a directory my friend.

sanjacob commented 3 months ago

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.