Commit 2a4704a
committed
Use more efficient workflow artifact replacement approach
The "Release" workflow (Go, Task, Crosscompile) template uses a GitHub Workflow to automatically generate releases of a
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. It turns out that 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, the dependence on the
"geekyeggo/delete-artifact" action can be avoided, making the workflow more simple, easier to maintain, and more secure.1 parent 089a4b2 commit 2a4704a
1 file changed
+2
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | 123 | | |
129 | 124 | | |
130 | 125 | | |
| |||
192 | 187 | | |
193 | 188 | | |
194 | 189 | | |
195 | | - | |
| 190 | + | |
196 | 191 | | |
197 | 192 | | |
198 | 193 | | |
199 | 194 | | |
| 195 | + | |
200 | 196 | | |
201 | 197 | | |
202 | 198 | | |
| |||
0 commit comments