diff --git a/.github/workflows/build-and-publish-snap.yml b/.github/workflows/build-and-publish-snap.yml deleted file mode 100644 index 6885d28..0000000 --- a/.github/workflows/build-and-publish-snap.yml +++ /dev/null @@ -1,99 +0,0 @@ -name: Build and publish snap - -on: - schedule: - - cron: "20 2 * * 1" # Monday morning 02:20 UTC - push: - branches: [ main ] - pull_request: - branches: [ main ] - # Allow manual trigger - workflow_dispatch: - -env: - ARTIFACT_AMD64: matter-all-clusters-app_${{ github.run_number}}_amd64 - ARTIFACT_ARM64: matter-all-clusters-app_${{ github.run_number}}_arm64 - -jobs: - build-amd64: - outputs: - snap: ${{ steps.snapcraft.outputs.snap }} - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Build snap - uses: snapcore/action-build@v1 - id: snapcraft - - - name: Upload artifact - uses: actions/upload-artifact@v4 - with: - name: ${{ env.ARTIFACT_AMD64 }} - path: ${{ steps.snapcraft.outputs.snap }} - if-no-files-found: error - - publish-amd64: - # Only publish if we are on the main branch - if: github.ref == 'refs/heads/main' - needs: build-amd64 - runs-on: ubuntu-latest - steps: - - name: Download locally built snap - uses: actions/download-artifact@v4 - with: - name: ${{ env.ARTIFACT_AMD64 }} - - - uses: snapcore/action-publish@v1 - env: - SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }} - with: - snap: ${{ needs.build-amd64.outputs.snap }} - release: latest/edge - - build-arm64: - # We do not start the long running arm64 build unless the amd64 build has passed. - needs: build-amd64 - outputs: - snap: ${{ steps.snapcraft.outputs.snap }} - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup QEMU - uses: docker/setup-qemu-action@v3 - with: - platforms: arm64 - - - name: Build snap - uses: diddlesnaps/snapcraft-multiarch-action@v1 - id: snapcraft - with: - architecture: arm64 - - - name: Upload artifact - uses: actions/upload-artifact@v4 - with: - name: ${{ env.ARTIFACT_ARM64 }} - path: ${{ steps.snapcraft.outputs.snap }} - - publish-arm64: - # Only publish if we are on the main branch - if: github.ref == 'refs/heads/main' - needs: [build-arm64] - runs-on: ubuntu-latest - steps: - - name: Download locally built snap - uses: actions/download-artifact@v4 - with: - name: ${{ env.ARTIFACT_ARM64 }} - - - uses: snapcore/action-publish@v1 - env: - SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }} - with: - snap: ${{ needs.build-arm64.outputs.snap }} - release: latest/edge - diff --git a/.github/workflows/cla-check.yml b/.github/workflows/cla-check.yml new file mode 100644 index 0000000..27bc14d --- /dev/null +++ b/.github/workflows/cla-check.yml @@ -0,0 +1,9 @@ +name: CLA Check +on: [pull_request_target] + +jobs: + cla-check: + runs-on: ubuntu-latest + steps: + - name: Check if CLA signed + uses: canonical/has-signed-canonical-cla@v1 diff --git a/.github/workflows/snap-ci.yml b/.github/workflows/snap-ci.yml new file mode 100644 index 0000000..c28f7fb --- /dev/null +++ b/.github/workflows/snap-ci.yml @@ -0,0 +1,49 @@ +name: Snap CI +on: + schedule: + - cron: "20 2 * * 1" # Monday mornings at 02:20 UTC + push: + branches: [main] + pull_request: + branches: [main] + # Allow manual trigger + workflow_dispatch: + +env: + SNAP_NAME: matter-all-clusters-app + +jobs: + build: + name: Build, Publish + strategy: + matrix: + runs: + - architecture: amd64 + runner: ubuntu-latest + - architecture: arm64 + runner: [self-hosted, ARM64, Linux] + runs-on: ${{ matrix.runs.runner }} + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Build snap + uses: snapcore/action-build@v1 + id: snapcraft + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: ${{env.SNAP_NAME}}_${{github.run_number}}_${{matrix.runs.architecture}} + path: ${{ steps.snapcraft.outputs.snap }} + if-no-files-found: error + + - name: Publish snap to edge + uses: snapcore/action-publish@v1 + if: github.ref == 'refs/heads/main' + env: + SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }} + with: + snap: ${{ steps.snapcraft.outputs.snap }} + release: latest/edge