From 6ecbe5a455fb43eadd4376ca556017a5f423d92a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Nov 2024 11:55:02 +0000 Subject: [PATCH 1/6] Bump actions/upload-artifact from 3 to 4 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/build.yml | 2 +- .github/workflows/check-go-dependencies-task.yml | 2 +- .github/workflows/release-go-task.yml | 4 ++-- .github/workflows/sync-labels.yml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 920afba..f5ec5f0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,7 +48,7 @@ jobs: run: 7z a "${{ github.workspace }}/${{ env.BUILD_OUTPUT_DIRECTORY }}/archive/${{ env.EXECUTABLE_NAME }}_${{ runner.OS }}_amd64.zip" "${{ github.workspace }}/${{ env.BUILD_OUTPUT_DIRECTORY }}/${{ runner.OS }}_amd64/*" - name: Upload Workflow Artifact [GitHub Actions] - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: build-artifacts # this makes the artifact a .zip of the .zip archive, which is currently necessary to preserve the executable file permissions diff --git a/.github/workflows/check-go-dependencies-task.yml b/.github/workflows/check-go-dependencies-task.yml index f61eb20..d287458 100644 --- a/.github/workflows/check-go-dependencies-task.yml +++ b/.github/workflows/check-go-dependencies-task.yml @@ -108,7 +108,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 include-hidden-files: true diff --git a/.github/workflows/release-go-task.yml b/.github/workflows/release-go-task.yml index 24cb29f..648e23f 100644 --- a/.github/workflows/release-go-task.yml +++ b/.github/workflows/release-go-task.yml @@ -58,7 +58,7 @@ jobs: run: task dist:${{ matrix.task }} - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: if-no-files-found: error name: ${{ env.ARTIFACT_NAME }} @@ -169,7 +169,7 @@ jobs: -C ../../ LICENSE.txt - name: Upload artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: if-no-files-found: error name: ${{ env.ARTIFACT_NAME }} diff --git a/.github/workflows/sync-labels.yml b/.github/workflows/sync-labels.yml index 0a211f5..5ab4aa4 100644 --- a/.github/workflows/sync-labels.yml +++ b/.github/workflows/sync-labels.yml @@ -71,7 +71,7 @@ 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 From 7c938771a25b8ed75a02160cec81346e9efeff73 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Dec 2023 11:12:09 +0000 Subject: [PATCH 2/6] Bump actions/download-artifact from 3 to 4 Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/build.yml | 2 +- .github/workflows/release-go-task.yml | 4 ++-- .github/workflows/sync-labels.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f5ec5f0..72136c4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -61,7 +61,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Download Workflow Artifact [GitHub Actions] - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: build-artifacts path: build-artifacts diff --git a/.github/workflows/release-go-task.yml b/.github/workflows/release-go-task.yml index 648e23f..32d64b4 100644 --- a/.github/workflows/release-go-task.yml +++ b/.github/workflows/release-go-task.yml @@ -95,7 +95,7 @@ jobs: uses: actions/checkout@v4 - name: Download artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ env.ARTIFACT_NAME }} path: ${{ env.DIST_DIR }} @@ -181,7 +181,7 @@ jobs: steps: - name: Download artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ env.ARTIFACT_NAME }} path: ${{ env.DIST_DIR }} diff --git a/.github/workflows/sync-labels.yml b/.github/workflows/sync-labels.yml index 5ab4aa4..b63161b 100644 --- a/.github/workflows/sync-labels.yml +++ b/.github/workflows/sync-labels.yml @@ -109,7 +109,7 @@ 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 }} path: ${{ env.CONFIGURATIONS_FOLDER }} From 774d277d4f238face1c549d906329a77b3a06c7c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Mar 2024 11:12:02 +0000 Subject: [PATCH 3/6] Bump geekyeggo/delete-artifact from 2 to 5 Bumps [geekyeggo/delete-artifact](https://github.com/geekyeggo/delete-artifact) from 2 to 5. - [Release notes](https://github.com/geekyeggo/delete-artifact/releases) - [Changelog](https://github.com/GeekyEggo/delete-artifact/blob/main/CHANGELOG.md) - [Commits](https://github.com/geekyeggo/delete-artifact/compare/v2...v5) --- updated-dependencies: - dependency-name: geekyeggo/delete-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/sync-labels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sync-labels.yml b/.github/workflows/sync-labels.yml index b63161b..f90ac26 100644 --- a/.github/workflows/sync-labels.yml +++ b/.github/workflows/sync-labels.yml @@ -115,7 +115,7 @@ jobs: path: ${{ env.CONFIGURATIONS_FOLDER }} - name: Remove unneeded artifact - uses: geekyeggo/delete-artifact@v2 + uses: geekyeggo/delete-artifact@v5 with: name: ${{ env.CONFIGURATIONS_ARTIFACT }} From 4a1f10248b68f1161e0dd56c219811dd1b17fec2 Mon Sep 17 00:00:00 2001 From: per1234 Date: Thu, 7 Nov 2024 04:06:23 -0800 Subject: [PATCH 4/6] Don't upload multiple times to same artifact in label sync workflow The "Sync Labels" GitHub Actions workflow is configured to allow the use of multiple shared label configuration files. This is done by using a job matrix in the GitHub Actions workflow to download each of the files from the source repository in a parallel GitHub Actions workflow job. A GitHub Actions workflow artifact was used to transfer the generated files between sequential jobs in the workflow. The "actions/upload-artifact" and "actions/download-artifact" actions are used for this purpose. Previously, a single artifact was used for the transfer of all the shared label configuration files, with each of the parallel jobs uploading its own generated files to that artifact. However, support for uploading multiple times to a single artifact was dropped in version 4.0.0 of the "actions/upload-artifact" action. So it is now necessary to use a dedicated artifact for each of the builds. These can be downloaded in aggregate by using the artifact name globbing and merging features which were introduced in version 4.1.0 of the "actions/download-artifact" action. --- .github/workflows/sync-labels.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/sync-labels.yml b/.github/workflows/sync-labels.yml index f90ac26..30809a1 100644 --- a/.github/workflows/sync-labels.yml +++ b/.github/workflows/sync-labels.yml @@ -19,7 +19,7 @@ on: env: CONFIGURATIONS_FOLDER: .github/label-configuration-files - CONFIGURATIONS_ARTIFACT: label-configuration-files + CONFIGURATIONS_ARTIFACT_PREFIX: label-configuration-file- jobs: check: @@ -77,7 +77,7 @@ jobs: *.yaml *.yml if-no-files-found: error - name: ${{ env.CONFIGURATIONS_ARTIFACT }} + name: ${{ env.CONFIGURATIONS_ARTIFACT_PREFIX }}${{ matrix.filename }} sync: needs: download @@ -108,16 +108,17 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Download configuration files artifact + - name: Download configuration file artifacts uses: actions/download-artifact@v4 with: - name: ${{ env.CONFIGURATIONS_ARTIFACT }} + merge-multiple: true + pattern: ${{ env.CONFIGURATIONS_ARTIFACT_PREFIX }}* path: ${{ env.CONFIGURATIONS_FOLDER }} - - name: Remove unneeded artifact + - name: Remove unneeded artifacts uses: geekyeggo/delete-artifact@v5 with: - name: ${{ env.CONFIGURATIONS_ARTIFACT }} + name: ${{ env.CONFIGURATIONS_ARTIFACT_PREFIX }}* - name: Merge label configuration files run: | From 83a018aec7343364fd0c406ad0282e5dc84adb61 Mon Sep 17 00:00:00 2001 From: per1234 Date: Thu, 7 Nov 2024 04:08:44 -0800 Subject: [PATCH 5/6] Don't upload multiple times to same artifact in release workflow The release workflow produces binaries for a range of target hosts. This is done by using a job matrix in the GitHub Actions workflow that produces each build in a parallel job. GitHub Actions workflow artifacts are used to transfer the generated files between sequential jobs in the workflow. The "actions/upload-artifact" action is used for this purpose. Previously, a single artifact was used for this purpose, with each of the parallel jobs uploading its own generated files to that artifact. However, support for uploading multiple times to a single artifact was dropped in version 4.0.0 of the "actions/upload-artifact" action. So it is now necessary to use a dedicated artifact for each of the builds. These can be downloaded in aggregate by using the artifact name globbing and merging features which were introduced in version 4.1.0 of the "actions/download-artifact" action. --- .github/workflows/release-go-task.yml | 53 +++++++++++++++++---------- 1 file changed, 33 insertions(+), 20 deletions(-) diff --git a/.github/workflows/release-go-task.yml b/.github/workflows/release-go-task.yml index 32d64b4..7e6d1a4 100644 --- a/.github/workflows/release-go-task.yml +++ b/.github/workflows/release-go-task.yml @@ -8,7 +8,7 @@ env: DIST_DIR: dist # The project's folder on Arduino's download server for uploading builds AWS_PLUGIN_TARGET: /arduino-language-server/ - ARTIFACT_NAME: dist + ARTIFACT_PREFIX: dist- on: push: @@ -21,16 +21,25 @@ jobs: strategy: matrix: - task: - - Windows_32bit - - Windows_64bit - - Linux_32bit - - Linux_64bit - - Linux_ARMv6 - - Linux_ARMv7 - - Linux_ARM64 - - macOS_64bit - - macOS_ARM64 + os: + - task: Windows_32bit + artifact-suffix: Windows_32bit + - task: Windows_64bit + artifact-suffix: Windows_64bit + - task: Linux_32bit + artifact-suffix: Linux_32bit + - task: Linux_64bit + artifact-suffix: Linux_64bit + - task: Linux_ARMv6 + artifact-suffix: Linux_ARMv6 + - task: Linux_ARMv7 + artifact-suffix: Linux_ARMv7 + - task: Linux_ARM64 + artifact-suffix: Linux_ARM64 + - task: macOS_64bit + artifact-suffix: macOS_64bit + - task: macOS_ARM64 + artifact-suffix: macOS_ARM64 steps: - name: Checkout repository @@ -40,7 +49,7 @@ jobs: - name: Create changelog # Avoid creating the same changelog for each os - if: matrix.task == 'Windows_32bit' + if: matrix.os.task == 'Windows_32bit' uses: arduino/create-changelog@v1 with: tag-regex: '^[0-9]+\.[0-9]+\.[0-9]+.*$' @@ -55,13 +64,13 @@ jobs: version: 3.x - name: Build - run: task dist:${{ matrix.task }} + run: task dist:${{ matrix.os.task }} - name: Upload artifacts uses: actions/upload-artifact@v4 with: if-no-files-found: error - name: ${{ env.ARTIFACT_NAME }} + name: ${{ env.ARTIFACT_PREFIX }}${{ matrix.os.artifact-suffix }} path: ${{ env.DIST_DIR }} notarize-macos: @@ -78,9 +87,11 @@ jobs: strategy: matrix: build: - - folder-suffix: darwin_amd64 + - artifact-suffix: macOS_64bit + folder-suffix: darwin_amd64 package-suffix: "macOS_64bit.tar.gz" - - folder-suffix: darwin_arm64 + - artifact-suffix: macOS_ARM64 + folder-suffix: darwin_arm64 package-suffix: "macOS_ARM64.tar.gz" steps: @@ -97,7 +108,7 @@ jobs: - name: Download artifacts uses: actions/download-artifact@v4 with: - name: ${{ env.ARTIFACT_NAME }} + name: ${{ env.ARTIFACT_PREFIX }}${{ matrix.build.artifact-suffix }} path: ${{ env.DIST_DIR }} - name: Import Code-Signing Certificates @@ -168,11 +179,12 @@ jobs: -C "${{ env.BUILD_FOLDER }}/" "${{ env.PROJECT_NAME }}" \ -C ../../ LICENSE.txt - - name: Upload artifact + - name: Replace artifact with notarized build uses: actions/upload-artifact@v4 with: if-no-files-found: error - name: ${{ env.ARTIFACT_NAME }} + name: ${{ env.ARTIFACT_PREFIX }}${{ matrix.build.artifact-suffix }} + overwrite: true path: ${{ env.DIST_DIR }}/${{ env.PACKAGE_FILENAME }} create-release: @@ -183,7 +195,8 @@ jobs: - name: Download artifact uses: actions/download-artifact@v4 with: - name: ${{ env.ARTIFACT_NAME }} + pattern: ${{ env.ARTIFACT_PREFIX }}* + merge-multiple: true path: ${{ env.DIST_DIR }} - name: Create checksum file From 3608ae200fa41df5e351dad0098556fecb805353 Mon Sep 17 00:00:00 2001 From: per1234 Date: Thu, 7 Nov 2024 04:13:56 -0800 Subject: [PATCH 6/6] Don't upload multiple times to same artifact in build workflow The "build" workflow produces binaries for a range of target hosts. This is done by using a job matrix in the GitHub Actions workflow that produces each build in a parallel job. GitHub Actions workflow artifacts are used to transfer the generated files between sequential jobs in the workflow. The "actions/upload-artifact" action is used for this purpose. Previously, a single artifact was used for this purpose, with each of the parallel jobs uploading its own generated files to that artifact. However, support for uploading multiple times to a single artifact was dropped in version 4.0.0 of the "actions/upload-artifact" action. So it is now necessary to use a dedicated artifact for each of the builds. These can be downloaded in aggregate by using the artifact name globbing and merging features which were introduced in version 4.1.0 of the "actions/download-artifact" action. --- .github/workflows/build.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 72136c4..4fe7180 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,6 +11,9 @@ on: branches: - main +env: + ARTIFACT_PREFIX: dist- + jobs: build: @@ -20,13 +23,16 @@ jobs: strategy: matrix: config: - - os: ubuntu-latest + - artifact-suffix: Linux_64bit + os: ubuntu-latest ExecutableSuffix: '' Exports: '' - - os: macos-latest + - artifact-suffix: macOS_ARM64 + os: macos-latest ExecutableSuffix: '' Exports: 'CGO_ENABLED=1 MACOSX_DEPLOYMENT_TARGET=10.14 ' - - os: windows-2019 + - artifact-suffix: Windows_64bit + os: windows-2019 ExecutableSuffix: '.exe' Exports: '' runs-on: ${{ matrix.config.os }} @@ -50,7 +56,7 @@ jobs: - name: Upload Workflow Artifact [GitHub Actions] uses: actions/upload-artifact@v4 with: - name: build-artifacts + name: ${{ env.ARTIFACT_PREFIX }}${{ matrix.config.artifact-suffix }} # this makes the artifact a .zip of the .zip archive, which is currently necessary to preserve the executable file permissions # see: https://github.com/actions/upload-artifact/issues/38 path: ${{ env.BUILD_OUTPUT_DIRECTORY }}/archive/${{ env.EXECUTABLE_NAME }}_${{ runner.OS }}_amd64.zip @@ -63,7 +69,8 @@ jobs: - name: Download Workflow Artifact [GitHub Actions] uses: actions/download-artifact@v4 with: - name: build-artifacts + pattern: ${{ env.ARTIFACT_PREFIX }}* + merge-multiple: true path: build-artifacts - name: Publish Nightly [S3]