action-publish icon indicating copy to clipboard operation
action-publish copied to clipboard

Is there a way to publish snap for multi-archs at once?

Open twang2218 opened this issue 4 years ago • 3 comments

I'm trying to create a snap build/publish for multiple architectures, e.g. amd64, ia32 and arm64, I didn't find a way to publish the snaps of multiple archs to the snap store at once. I have to call this action multiple times for now. Is there anything I'm missing?

twang2218 avatar Nov 05 '21 14:11 twang2218

Same here. Do we really have to have two separate blocks of YAML to do multiarch support in the Store?

willcharlton avatar Jan 19 '23 17:01 willcharlton

It can be configured to build and publish using a github matrix:


jobs:
  snapcraft:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        arch: [amd64, arm64, armhf]
    steps:
      - uses: actions/checkout@v3

      - uses: snapcore/action-build@v1
        id: build
        with:
          snapcraft-args: --build-for=${{ matrix.arch }}
  
      - uses: snapcore/action-publish@v1
        env:
          SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }}
        with:
          snap: ${{ steps.build.outputs.snap }}
          release: edge

May be a similar example can be added in either this action or the build one.

prodrigestivill avatar Jun 05 '23 13:06 prodrigestivill