From aacf7938ae6cf3447d02847a1a4f606bd0b2f2cf Mon Sep 17 00:00:00 2001 From: Piper McCorkle Date: Wed, 26 Oct 2022 06:11:19 -0500 Subject: [PATCH] Add CI build for Snap Signed-off-by: Piper McCorkle --- .github/workflows/build.yml | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ac701c1e0..31e4112a6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -412,5 +412,25 @@ jobs: with: name: PrismLauncher-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }}-x86_64.AppImage path: PrismLauncher-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }}-x86_64.AppImage - - + snap: + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'true' + - name: Set short version + shell: bash + run: | + ver_short=`git rev-parse --short HEAD` + echo "VERSION=$ver_short" >> $GITHUB_ENV + - name: Package Snap (Linux) + id: snapcraft + if: runner.os == 'Linux' && matrix.qt_ver != 5 + uses: snapcore/action-build@v1 + - name: Upload Snap (Linux) + if: runner.os == 'Linux' && matrix.qt_ver != 5 + uses: actions/upload-artifact@v3 + with: + name: prismlauncher_${{ env.VERSION }}_amd64.snap + path: ${{ steps.snapcraft.outputs.snap }}