Unverified Commit cbec8711 authored by Cristian Maglie's avatar Cristian Maglie Committed by GitHub

[skip-changelog] Update artifact-related actions (#2679)

* Updated check-go-dependency workflow

In this case we should be fine since there is just one job that uploads
the artifacts.

* Updated publish-go-tester workflow

In this case the uploaded artifacts uses different paths and names,
there should be no breaking changes.

* Updated publish-go-nightly job

In this case the jobs exploited the previous action behaviour when
uploading multiple artifacts under the same "name".
To upgrade to v4 we need to upload artifacts with unique "name" and
merge them when downloading using the "pattern" property.

* Updated release-go job

This job got the same changes made in the publish-go-nightly job.

* Updated sync-label job

* Updated test-go job

* Updated comments

* Missed matrix run in sync-labels workflows.

* Missed double-matrix run in test-go workflow
parent c86ca301
......@@ -102,7 +102,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
......
......@@ -65,10 +65,10 @@ jobs:
run: echo "version=$(task general:get-version)" >> $GITHUB_OUTPUT
- 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:
......@@ -92,9 +92,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
......@@ -156,7 +157,7 @@ jobs:
working-directory: ${{ env.DIST_DIR }}
# Repackage the signed binary replaced in place by Gon (ignoring the output zip file)
run: |
# GitHub's upload/download-artifact@v2 actions don't preserve file permissions,
# GitHub's upload/download-artifact actions don't preserve file permissions,
# so we need to add execution permission back until the action is made to do this.
chmod +x "${{ env.PROJECT_NAME }}_osx_${{ matrix.artifact.name }}/${{ env.PROJECT_NAME }}"
VERSION=${{ needs.create-nightly-artifacts.outputs.version }}
......@@ -167,10 +168,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-windows-installer:
......@@ -192,9 +193,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: Prepare PATH
......@@ -222,12 +224,12 @@ jobs:
"${{ env.SIGNTOOL_PATH }}" sign -d "Arduino CLI" -f ${{ env.INSTALLER_CERT_WINDOWS_CER}} -csp "eToken Base Cryptographic Provider" -k "[{{${{ env.CERT_PASSWORD }}}}]=${{ env.CONTAINER_NAME }}" -fd sha256 -tr http://timestamp.digicert.com -td SHA256 -v "${{ env.MSI_FILE }}"
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
env:
MSI_FILE: ${{ steps.buildmsi.outputs.msi }}
with:
if-no-files-found: error
name: ${{ env.ARTIFACT_NAME }}
name: ${{ env.ARTIFACT_NAME }}-windows-installer
path: ${{ env.MSI_FILE }}
publish-nightly:
......@@ -246,9 +248,10 @@ jobs:
uses: actions/checkout@v4
- 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: Install Task
......
......@@ -135,7 +135,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.artifact.path }}
name: ${{ matrix.artifact.name }}
......@@ -148,7 +148,7 @@ jobs:
steps:
- name: Download build artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
- name: Output checksum
run: |
TAG="${{ needs.package-name-prefix.outputs.prefix }}git-snapshot"
......@@ -162,7 +162,7 @@ jobs:
done
- name: Upload checksum artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: ./*checksums.txt
name: checksums
......@@ -65,10 +65,10 @@ jobs:
run: echo "version=$(task general:get-version)" >> $GITHUB_OUTPUT
- 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:
......@@ -92,9 +92,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
......@@ -156,7 +157,7 @@ jobs:
working-directory: ${{ env.DIST_DIR }}
# Repackage the signed binary replaced in place by Gon (ignoring the output zip file)
run: |
# GitHub's upload/download-artifact@v2 actions don't preserve file permissions,
# GitHub's upload/download-artifact actions don't preserve file permissions,
# so we need to add execution permission back until the action is made to do this.
chmod +x "${{ env.PROJECT_NAME }}_osx_${{ matrix.artifact.name }}/${{ env.PROJECT_NAME }}"
TAG=${{ needs.create-release-artifacts.outputs.version }}
......@@ -167,10 +168,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-windows-installer:
......@@ -192,9 +193,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: Prepare PATH
......@@ -222,12 +224,12 @@ jobs:
"${{ env.SIGNTOOL_PATH }}" sign -d "Arduino CLI" -f ${{ env.INSTALLER_CERT_WINDOWS_CER}} -csp "eToken Base Cryptographic Provider" -k "[{{${{ env.CERT_PASSWORD }}}}]=${{ env.CONTAINER_NAME }}" -fd sha256 -tr http://timestamp.digicert.com -td SHA256 -v "${{ env.MSI_FILE }}"
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
env:
MSI_FILE: ${{ steps.buildmsi.outputs.msi }}
with:
if-no-files-found: error
name: ${{ env.ARTIFACT_NAME }}
name: ${{ env.ARTIFACT_NAME }}-windows-installer
path: ${{ env.MSI_FILE }}
create-release:
......@@ -246,9 +248,10 @@ jobs:
uses: actions/checkout@v4
- 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: Install Task
......
......@@ -71,13 +71,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
......@@ -109,13 +109,14 @@ 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 }}
......
......@@ -114,10 +114,10 @@ jobs:
mv coverage_integration.txt coverage_integration_${{ matrix.operating-system }}_${{ matrix.tests }}.txt
- name: Upload coverage data to workflow artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: ${{ env.COVERAGE_ARTIFACT }}
name: ${{ env.COVERAGE_ARTIFACT }}-test-integration-${{ matrix.operating-system }}-${{ matrix.tests }}
path: |
./coverage_integration_*.txt
......@@ -157,10 +157,10 @@ jobs:
- name: Upload coverage data to workflow artifact
if: runner.os == 'Linux'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: ${{ env.COVERAGE_ARTIFACT }}
name: ${{ env.COVERAGE_ARTIFACT }}-test-${{ matrix.operating-system }}
path: |
./coverage_unit.txt
......@@ -182,9 +182,10 @@ jobs:
run: go install github.com/wadey/gocovmerge@b5bfa59
- name: Download coverage data artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ env.COVERAGE_ARTIFACT }}
pattern: ${{ env.COVERAGE_ARTIFACT }}-*
merge-multiple: true
- name: Merge all code coverage artifacts
run: gocovmerge coverage*.txt > coverage.txt
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment