Skip to content

Commit 3fb087f

Browse files
committed
Delete job transfer workflow artifact
The "Arduino IDE" GitHub Actions workflow uses a workflow artifact to transfer the build artifacts between jobs. Now that separate tester build artifacts are produced, the monolithic job transfer artifact is superfluous once the workflow run is finished. Deleting it avoids potential confusion for beta testers and unnecessary storage space usage.
1 parent 2729277 commit 3fb087f

File tree

1 file changed

+42
-26
lines changed

1 file changed

+42
-26
lines changed

Diff for: .github/workflows/build.yml

+42-26
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,39 @@ jobs:
8585
name: ${{ env.JOB_TRANSFER_ARTIFACT }}
8686
path: electron/build/dist/build-artifacts/
8787

88+
artifacts:
89+
name: ${{ matrix.artifact.name }} artifact
90+
needs: build
91+
if: always() && needs.build.result != 'skipped'
92+
runs-on: ubuntu-latest
93+
94+
strategy:
95+
matrix:
96+
artifact:
97+
- path: "*Linux_64bit.zip"
98+
name: Linux_X86-64
99+
- path: "*macOS_64bit.dmg"
100+
name: macOS
101+
- path: "*Windows_64bit.exe"
102+
name: Windows_X86-64_interactive_installer
103+
- path: "*Windows_64bit.msi"
104+
name: Windows_X86-64_MSI
105+
- path: "*Windows_64bit.zip"
106+
name: Windows_X86-64_zip
107+
108+
steps:
109+
- name: Download job transfer artifact
110+
uses: actions/download-artifact@v2
111+
with:
112+
name: ${{ env.JOB_TRANSFER_ARTIFACT }}
113+
path: ${{ env.JOB_TRANSFER_ARTIFACT }}
114+
115+
- name: Upload tester build artifact
116+
uses: actions/upload-artifact@v2
117+
with:
118+
name: ${{ matrix.artifact.name }}
119+
path: ${{ env.JOB_TRANSFER_ARTIFACT }}/${{ matrix.artifact.path }}
120+
88121
changelog:
89122
needs: build
90123
runs-on: ubuntu-latest
@@ -184,35 +217,18 @@ jobs:
184217
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
185218
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
186219

187-
artifacts:
188-
name: ${{ matrix.artifact.name }} artifact
189-
needs: build
220+
clean:
221+
# This job must run after all jobs that use the transfer artifact.
222+
needs:
223+
- build
224+
- publish
225+
- release
226+
- artifacts
190227
if: always() && needs.build.result != 'skipped'
191228
runs-on: ubuntu-latest
192229

193-
strategy:
194-
matrix:
195-
artifact:
196-
- path: "*Linux_64bit.zip"
197-
name: Linux_X86-64
198-
- path: "*macOS_64bit.dmg"
199-
name: macOS
200-
- path: "*Windows_64bit.exe"
201-
name: Windows_X86-64_interactive_installer
202-
- path: "*Windows_64bit.msi"
203-
name: Windows_X86-64_MSI
204-
- path: "*Windows_64bit.zip"
205-
name: Windows_X86-64_zip
206-
207230
steps:
208-
- name: Download job transfer artifact
209-
uses: actions/download-artifact@v2
231+
- name: Remove unneeded job transfer artifact
232+
uses: geekyeggo/delete-artifact@v1
210233
with:
211234
name: ${{ env.JOB_TRANSFER_ARTIFACT }}
212-
path: ${{ env.JOB_TRANSFER_ARTIFACT }}
213-
214-
- name: Upload tester build artifact
215-
uses: actions/upload-artifact@v2
216-
with:
217-
name: ${{ matrix.artifact.name }}
218-
path: ${{ env.JOB_TRANSFER_ARTIFACT }}/${{ matrix.artifact.path }}

0 commit comments

Comments
 (0)