Skip to content

Use more efficient release artifact replacement approach #151

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

Merged

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented May 18, 2025

The "Release" GitHub Actions workflow automatically generates releases of the project. This is done for a range of host architectures, including macOS. The macOS builds are then put through a notarization process in a dedicated workflow job.

The builds are transferred between jobs by GitHub Actions workflow artifacts. The "create-release-artifacts" job produces macOS workflow artifacts containing non-notarized builds, which must then be replaced after the builds are notarized by the "notarize-macos" job.

Previously, the approach chosen to accomplish this replacement was to use the community created "geekyeggo/delete-artifact" action to delete each artifact after it had been downloaded by the "notarize-macos" job, then replacing it by uploading the notarized version using the "actions/upload-artifact" action.

The ability to overwrite workflows was recently added to the "actions/upload-artifact" action (actions/upload-artifact@11ff42c). This behavior is enabled by setting the action's overwrite input to true. By using this feature, we avoid the need to delete the artifact and thus the dependence on the "geekyeggo/delete-artifact" action is avoided, making the workflow more simple, easier to maintain, and more secure.

The "Release" GitHub Actions workflow automatically generates releases of the project. This is done for a range of host
architectures, including macOS. The macOS builds are then put through a notarization process in a dedicated workflow
job.

The builds are transferred between jobs by GitHub Actions workflow artifacts. The "create-release-artifacts" job
produces macOS workflow artifacts containing non-notarized builds, which must then be replaced after the builds are
notarized by the "notarize-macos" job.

Previously, the approach chosen to accomplish this replacement was to use the community created
"geekyeggo/delete-artifact" action to delete each artifact after it had been downloaded by the "notarize-macos" job,
then replacing it by uploading the notarized version using the "actions/upload-artifact" action.

The ability to overwrite workflows was recently added to the "actions/upload-artifact" action. This behavior is enabled
by setting the action's `overwrite` input to `true`. By using this feature, we avoid the need to delete the artifact and
thus the dependence on the "geekyeggo/delete-artifact" action is avoided, making the workflow more simple, easier to
maintain, and more secure.
@per1234 per1234 self-assigned this May 18, 2025
@per1234 per1234 added type: enhancement Proposed improvement topic: infrastructure Related to project infrastructure labels May 18, 2025
@per1234 per1234 merged commit 6eec6fb into arduino:master May 18, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: infrastructure Related to project infrastructure type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant