.github/workflows/build_snap.yml
author Edouard Tisserant <edouard.tisserant@gmail.com>
Mon, 13 Feb 2023 22:03:09 +0100
changeset 112 b78f14613a6c
parent 99 0623d6d4616b
permissions -rw-r--r--
Fix computation of BVERSION leading to error message if beremiz source tree is missing when make is invoked
name: Build Snap

on:
  workflow_dispatch:
  # push:
  #   branches: [ default ]

jobs:
  sources:
    uses: ./.github/workflows/prep_sources.yml

  build:
    needs: sources
    runs-on: ubuntu-latest

    steps:

    - name: Download source artifact
      uses: actions/download-artifact@v3
      with:
        name: source_package

    - name: untar files
      run: tar -xvf sources.tar

    - name: Move snap dir and revisions.txt in build/sources
      run: |
        mv beremiz_public_dist/snap build/sources
        mv build/revisions.txt build/sources/revisions.txt

    - name: Invoke snapcraft build
      uses: snapcore/action-build@v1
      id: snapcraft
      with:
        path: build/sources

    - name: Upload built artifact
      uses: actions/upload-artifact@v3
      with:
        name: snap
        path: ${{ steps.snapcraft.outputs.snap }}