From d88abc23202248da375e37a5cee4abf76aa769e4 Mon Sep 17 00:00:00 2001 From: deadprogram Date: Thu, 10 Sep 2026 11:57:06 +0200 Subject: [PATCH] ci: correct the artifact name in the macOS test jobs upload-artifact gives an artifact uploaded with "archive: false" the name of the file, not the name in the "name" input. Download the tarball by its file name, and find it on disk instead of assuming where it lands. --- .github/workflows/build-macos.yml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 08149c970..9fbfb7f01 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -118,10 +118,17 @@ jobs: - name: Download TinyGo build uses: actions/download-artifact@v8 with: - name: darwin-${{ matrix.goarch }}-double-zipped-${{ steps.version.outputs.version }} + # An artifact uploaded with "archive: false" takes the name of the + # file, not the name given to upload-artifact. See the comment on + # "Collect the release files" in release.yml. + name: tinygo${{ steps.version.outputs.version }}.darwin-${{ matrix.goarch }}.tar.gz path: build/ + skip-decompress: true - name: Unpack TinyGo build - run: tar -xzf build/tinygo${{ steps.version.outputs.version }}.darwin-${{ matrix.goarch }}.tar.gz -C build + run: | + tarball=$(find build -type f -name 'tinygo*.darwin-*.tar.gz' | head -1) + test -n "$tarball" + tar -xzf "$tarball" -C build - name: Test stdlib packages run: make tinygo-test TINYGO=$(PWD)/build/tinygo/bin/tinygo @@ -159,10 +166,17 @@ jobs: - name: Download TinyGo build uses: actions/download-artifact@v8 with: - name: darwin-${{ matrix.goarch }}-double-zipped-${{ steps.version.outputs.version }} + # An artifact uploaded with "archive: false" takes the name of the + # file, not the name given to upload-artifact. See the comment on + # "Collect the release files" in release.yml. + name: tinygo${{ steps.version.outputs.version }}.darwin-${{ matrix.goarch }}.tar.gz path: build/ + skip-decompress: true - name: Unpack TinyGo build - run: tar -xzf build/tinygo${{ steps.version.outputs.version }}.darwin-${{ matrix.goarch }}.tar.gz -C build + run: | + tarball=$(find build -type f -name 'tinygo*.darwin-*.tar.gz' | head -1) + test -n "$tarball" + tar -xzf "$tarball" -C build - name: Smoke tests run: make ${{ matrix.smoketest }} TINYGO=$(PWD)/build/tinygo/bin/tinygo