Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: don't double zip mac .app #2234

Closed
wants to merge 1 commit into from

Conversation

briaguya-ai
Copy link

resolves #2232

https://github.com/actions/upload-artifact always zips whatever is put in path (doesn't matter if it's a file or directory or wildcard)

this gets a little complicated when dealing with .apps on macOS because .apps are just directories

this means if you just had

      - name: Upload artifact
        uses: actions/upload-artifact@v4
        with:
          name: macOS-universal
          path: melonDS.app

upload-artifact would treat melonDS.app as a directory and create a zip with the contents of the directory, so when someone unzips it they'd just get a Contents directory.

zipping the .app fixes that issue, but leads to the reported problem of double zips

this PR works around both issues by creating a new directory, moving the .app into that directory, and setting that directory as the path for the upload-artifact action

tested on my fork: briaguya-ai#1

@nadiaholmquist
Copy link
Collaborator

nadiaholmquist commented Dec 13, 2024

I tested this myself earlier and the executable in the bundle did not end up marked as executable. Are you sure it actually is?

Edit: Interestingly the app bundle does indeed not have its executable marked as executable, but Finder fixes it when you try to open the app. But until you do the icon is displayed like a broken/incompatible app, which I don't think is really ideal.

@briaguya-ai
Copy link
Author

I tested this myself earlier and the executable in the bundle did not end up marked as executable.

interesting, i'm on linux (don't have a mac) so i didn't notice that (i just checked the contents of the zip file, didn't think to check perms)

based on https://github.com/actions/upload-artifact?tab=readme-ov-file#permission-loss it seems double zipping is the best way to preserve perms

If you must preserve permissions, you can tar all of your files together before artifact upload. Post download, the tar file will maintain file permissions and case sensitivity.

i'll go ahead and close this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"macOS-universal.zip" is double-compressed
2 participants