---
name: Snapcraft tab Publish
on:
  push:
    tags: [not-trigger-v*.*.*]
  workflow_dispatch:
jobs:
  snapcraft-releaser:
    runs-on: ubuntu-latest
    name: snapcraft-releaser
    strategy:
      fail-fast: false
      matrix:
        platform:
          - amd64
          - armhf
          - arm64
          - ppc64el
    steps:
      - name: Check out Git repository
        uses: actions/checkout@v3
      - uses: diddlesnaps/snapcraft-multiarch-action@v1
        with:
          architecture: ${{ matrix.platform }}
        id: build
      - uses: diddlesnaps/snapcraft-review-action@v1
        with:
          snap: ${{ steps.build.outputs.snap }}
      - uses: snapcore/action-publish@master
        env:
          SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_STORE_LOGIN }}
        with:
          snap: ${{ steps.build.outputs.snap }}
          release: stable
