Skip to content

Commit

Permalink
Merge pull request #507 from arduino/update-some-workflows-artifact-a…
Browse files Browse the repository at this point in the history
…ctions

Update some workflows upload/download artifact actions
  • Loading branch information
cmaglie authored Aug 5, 2024
2 parents 9064feb + 0240e3b commit 2292b6a
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 26 deletions.
2 changes: 1 addition & 1 deletion workflow-templates/check-go-dependencies-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
# Some might find it convenient to have CI generate the cache rather than setting up for it locally
- name: Upload cache to workflow artifact
if: failure() && steps.diff.outcome == 'failure'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: dep-licenses-cache
Expand Down
18 changes: 10 additions & 8 deletions workflow-templates/publish-go-nightly-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ jobs:
run: task dist:${{ matrix.os }}

- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: ${{ env.ARTIFACT_NAME }}
name: ${{ env.ARTIFACT_NAME }}-${{ matrix.os }}
path: ${{ env.DIST_DIR }}

notarize-macos:
Expand Down Expand Up @@ -88,9 +88,10 @@ jobs:
uses: actions/checkout@v4

- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
pattern: ${{ env.ARTIFACT_NAME }}-*
merge-multiple: true
path: ${{ env.DIST_DIR }}

- name: Import Code-Signing Certificates
Expand Down Expand Up @@ -165,10 +166,10 @@ jobs:
echo "PACKAGE_FILENAME=$PACKAGE_FILENAME" >> $GITHUB_ENV
- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: ${{ env.ARTIFACT_NAME }}
name: ${{ env.ARTIFACT_NAME }}-notarized-${{ matrix.artifact.name }}
path: ${{ env.DIST_DIR }}/${{ env.PACKAGE_FILENAME }}

publish-nightly:
Expand All @@ -180,9 +181,10 @@ jobs:

steps:
- name: Download artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
pattern: ${{ env.ARTIFACT_NAME }}-*
merge-multiple: true
path: ${{ env.DIST_DIR }}

- name: Create checksum file
Expand Down
6 changes: 3 additions & 3 deletions workflow-templates/publish-go-tester-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ jobs:
# Transfer builds to artifacts job
- name: Upload build artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: ${{ env.DIST_DIR }}/${{ matrix.os.path }}
name: ${{ matrix.os.name }}
Expand All @@ -146,7 +146,7 @@ jobs:

steps:
- name: Download build artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4

- name: Create checksum file
run: |
Expand All @@ -161,7 +161,7 @@ jobs:
done
- name: Upload checksum artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: ./*checksums.txt
name: checksums
18 changes: 10 additions & 8 deletions workflow-templates/release-go-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ jobs:
run: task dist:${{ matrix.os }}

- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: ${{ env.ARTIFACT_NAME }}
name: ${{ env.ARTIFACT_NAME }}-${{ matrix.os }}
path: ${{ env.DIST_DIR }}

notarize-macos:
Expand Down Expand Up @@ -93,9 +93,10 @@ jobs:
uses: actions/checkout@v4

- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
pattern: ${{ env.ARTIFACT_NAME }}-*
merge-multiple: true
path: ${{ env.DIST_DIR }}

- name: Import Code-Signing Certificates
Expand Down Expand Up @@ -170,10 +171,10 @@ jobs:
echo "PACKAGE_FILENAME=$PACKAGE_FILENAME" >> $GITHUB_ENV
- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: ${{ env.ARTIFACT_NAME }}
name: ${{ env.ARTIFACT_NAME }}-notarized-${{ matrix.artifact.name }}
path: ${{ env.DIST_DIR }}/${{ env.PACKAGE_FILENAME }}

create-release:
Expand All @@ -186,9 +187,10 @@ jobs:

steps:
- name: Download artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
pattern: ${{ env.ARTIFACT_NAME }}-*
merge-multiple: true
path: ${{ env.DIST_DIR }}

- name: Create checksum file
Expand Down
13 changes: 7 additions & 6 deletions workflow-templates/sync-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ jobs:
file-url: https://raw.githubusercontent.com/arduino/tooling-project-assets/main/workflow-templates/assets/sync-labels/${{ matrix.filename }}

- name: Pass configuration files to next job via workflow artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: |
*.yaml
*.yml
if-no-files-found: error
name: ${{ env.CONFIGURATIONS_ARTIFACT }}
name: ${{ env.CONFIGURATIONS_ARTIFACT }}-${{ matrix.filename }}

sync:
needs: download
Expand Down Expand Up @@ -114,15 +114,16 @@ jobs:
uses: actions/checkout@v4

- name: Download configuration files artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ env.CONFIGURATIONS_ARTIFACT }}
pattern: ${{ env.CONFIGURATIONS_ARTIFACT }}-*
merge-multiple: true
path: ${{ env.CONFIGURATIONS_FOLDER }}

- name: Remove unneeded artifact
uses: geekyeggo/delete-artifact@v2
uses: geekyeggo/delete-artifact@v5
with:
name: ${{ env.CONFIGURATIONS_ARTIFACT }}
name: ${{ env.CONFIGURATIONS_ARTIFACT }}-*

- name: Merge label configuration files
run: |
Expand Down

0 comments on commit 2292b6a

Please sign in to comment.