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

[bug] Uploaded macOS bundle becomes folder

Open paulz opened this issue 3 years ago • 3 comments

What happened?

In our workflow:

      - name: Save Xcode archive
        uses: actions/upload-artifact@v3
        with:
          path: App.xcarchive
          name: App.xcarchive

What did you expect to happen?

we expect download name to be App.xcarchive

How can we reproduce it?

on macOS runner

      - run: mkdir App.xcarchive
      - name: Save Xcode archive
        uses: actions/upload-artifact@v3
        with:
          path: App.xcarchive
          name: App.xcarchive

On build summary artifact is shown as App.xcarchive but when we download it we see it as a folder App

As a workaround we manually rename App folder to App.xcarchive and becomes Xcode archive bundle

Anything else we need to know?

No response

What version of the action are you using?

v3

What are your runner environments?

self-hosted, macos

Are you on GitHub Enterprise Server? If so, what version?

No response

paulz avatar May 15 '22 06:05 paulz

Same issue for me :( The reason is that MacOS application bundle is a folder. Probably we have to create the .dmg file

Lecrapouille avatar Aug 23 '22 16:08 Lecrapouille

@paulz I fixed with:

      - name: Create the DMG file
        run: |
          hdiutil create -format UDZO -srcfolder build/XXX.app build/XXX.dmg
...

      - name: Deploy
        uses: actions/upload-artifact@v3
        with:
          name: XXX-macos
          path: build/XXX.dmg

AFAIK since I do not have MacOS I cannot check if the dmg is functional

Lecrapouille avatar Aug 26 '22 10:08 Lecrapouille

@paulz I fixed with:

      - name: Create the DMG file
        run: |
          hdiutil create -format UDZO -srcfolder build/XXX.app build/XXX.dmg
...

      - name: Deploy
        uses: actions/upload-artifact@v3
        with:
          name: XXX-macos
          path: build/XXX.dmg

AFAIK since I do not have MacOS I cannot check if the dmg is functional

I had the same issue and I tried this workaround. I can confirm that it creates a functional dmg. Thank you for sharing!

ilovelinux avatar Aug 21 '23 18:08 ilovelinux