Download Github Actions Artifacts

I’m trying to build the bin files using Github Actions and attache them to a release. The building works fine now. Next up downloading the artifacts… I get this output:

RAM:   [===       ]  31.1% (used 101928 bytes from 327680 bytes)
Flash: [========= ]  85.9% (used 1238530 bytes from 1441792 bytes)
Building .pio/build/MCU4M-PROD/firmware.bin v3.1
Merged 1 ELF section
======================== [SUCCESS] Took 106.34 seconds ========================

Environment    Status    Duration
-------------  --------  ------------
MCU4M-PROD     SUCCESS   00:01:46.336
========================= 1 succeeded in 00:01:46.336 =========================
Run actions/download-artifact@v3
    path: .pio/build/MCU4M-PROD/
    name: firmware.bin
    pythonLocation: /opt/hostedtoolcache/Python/3.9.16/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.9.16/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.16/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.16/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.16/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.16/x64/lib
Starting download for firmware.bin
Error: Unable to find any artifacts for the associated workflow

Does anyone have an idea where those files are saved.

In a related example, if in one repo I do

I can retrieve those archives in another repo by doing

That should be pretty simple.

1 Like

Interesting, so you don’t use the actions/download-artifact@v3?

Here’s my YAML:

name: PlatformIO CI

on: [push]

    runs-on: ubuntu-latest

      - uses: actions/checkout@v3
      - uses: actions/cache@v3
          path: |
          key: ${{ runner.os }}-pio
      - uses: actions/setup-python@v4
          python-version: '3.9'
      - name: Install PlatformIO Core
        run: pip install --upgrade platformio

      - name: Build PlatformIO Project
        run: pio run

      - name: Download build files
        uses: actions/download-artifact@v3
          path: .pio/build/MCU4M-PROD/
          name: firmware.bin

But where are the artifacts uploaded that download-artifacts is supposed to get? I don’t see a actions/upload-artifact@v3 action in this YAML file, is it in another repo?


I would like to download the bin file, that is fully generated in the cloud. But that’s where I probably have a wrong idea of artifacts… I’ll try your code example in stead.

I got the chance to pick this up again and I was confused about upload/download :crazy_face:

It does work now. Almost there… Next up, getting the right commit description in github actions so I can get the full version included in the name.