From 3fb087f1ada994b62ac6363b916b4849c7179a95 Mon Sep 17 00:00:00 2001 From: per1234 Date: Mon, 22 Mar 2021 21:10:55 -0700 Subject: [PATCH] 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. --- .github/workflows/build.yml | 68 +++++++++++++++++++++++-------------- 1 file changed, 42 insertions(+), 26 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 999563ba..b33ef1e3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -85,6 +85,39 @@ jobs: name: ${{ env.JOB_TRANSFER_ARTIFACT }} path: electron/build/dist/build-artifacts/ + artifacts: + name: ${{ matrix.artifact.name }} artifact + needs: build + if: always() && needs.build.result != 'skipped' + runs-on: ubuntu-latest + + strategy: + matrix: + artifact: + - path: "*Linux_64bit.zip" + name: Linux_X86-64 + - path: "*macOS_64bit.dmg" + name: macOS + - path: "*Windows_64bit.exe" + name: Windows_X86-64_interactive_installer + - path: "*Windows_64bit.msi" + name: Windows_X86-64_MSI + - path: "*Windows_64bit.zip" + name: Windows_X86-64_zip + + steps: + - name: Download job transfer artifact + uses: actions/download-artifact@v2 + with: + name: ${{ env.JOB_TRANSFER_ARTIFACT }} + path: ${{ env.JOB_TRANSFER_ARTIFACT }} + + - name: Upload tester build artifact + uses: actions/upload-artifact@v2 + with: + name: ${{ matrix.artifact.name }} + path: ${{ env.JOB_TRANSFER_ARTIFACT }}/${{ matrix.artifact.path }} + changelog: needs: build runs-on: ubuntu-latest @@ -184,35 +217,18 @@ jobs: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - artifacts: - name: ${{ matrix.artifact.name }} artifact - needs: build + clean: + # This job must run after all jobs that use the transfer artifact. + needs: + - build + - publish + - release + - artifacts if: always() && needs.build.result != 'skipped' runs-on: ubuntu-latest - strategy: - matrix: - artifact: - - path: "*Linux_64bit.zip" - name: Linux_X86-64 - - path: "*macOS_64bit.dmg" - name: macOS - - path: "*Windows_64bit.exe" - name: Windows_X86-64_interactive_installer - - path: "*Windows_64bit.msi" - name: Windows_X86-64_MSI - - path: "*Windows_64bit.zip" - name: Windows_X86-64_zip - steps: - - name: Download job transfer artifact - uses: actions/download-artifact@v2 + - name: Remove unneeded job transfer artifact + uses: geekyeggo/delete-artifact@v1 with: name: ${{ env.JOB_TRANSFER_ARTIFACT }} - path: ${{ env.JOB_TRANSFER_ARTIFACT }} - - - name: Upload tester build artifact - uses: actions/upload-artifact@v2 - with: - name: ${{ matrix.artifact.name }} - path: ${{ env.JOB_TRANSFER_ARTIFACT }}/${{ matrix.artifact.path }}