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

feat: Add option to modify whether symlink if followed in ZIP archive #1803

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

eXhumer
Copy link

@eXhumer eXhumer commented Aug 22, 2024

First step at fixing actions/upload-artifact#93

Currently, upload-artifact automatically follows symlinks present in specified paths. The problem with this approach is that it breaks macOS code-signed application packages that contains symlinks (like Electron) if the .app folder is specified to path without it being zipped. If we don't follow the symlink and simply preserve the symlinks as is, macOS code-signed Electron application no longer stops working.

Two changes are required to be able to allow disabling follow symlink.

The first is to return the target path of a symlink with getUploadZipSpecification, modifying createZipUploadStream with option to follow symlinks and adding symlink to zip as necessary.

The second is to add the option to upload-artifact and passing the option to uploadArtifact method.

I have already done both of the changes and have tested it to make sure it is working as intended with forked upload-artifact eXhumer/upload-artifact@0b7d5f5684d3f642f978d2faad9ade64f5b4dd57.

With the changes and specifying follow-symlinks: false in my GitHub Action workflow, upload-artifact no longer breaks the macOS application package.

@eXhumer eXhumer requested review from a team as code owners August 22, 2024 12:43
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.

1 participant