Merge PR #548: Fix snap version

This commit is contained in:
Jenkins nymea 2021-03-07 12:29:03 +01:00
commit f123997193
3 changed files with 65 additions and 4 deletions

52
.github/workflows/snap.yml vendored Normal file
View File

@ -0,0 +1,52 @@
name: Snap
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
Snap:
runs-on: ubuntu-latest
env:
SNAPCRAFT_BUILD_INFO: 1
timeout-minutes: 60
steps:
- name: Install Snapcraft
uses: Saviq/action-snapcraft@add-channel
with:
channel: candidate
use_lxd: true
- name: Check out code
uses: actions/checkout@v2
with:
submodules: true
# Needed for version determination to work
fetch-depth: 0
- name: Build
run: |
# Build the parts.
sg lxd -c '/snap/bin/snapcraft build --use-lxd'
- name: Build and verify the snap
id: build-snap
env:
SNAP_ENFORCE_RESQUASHFS: 0
run: |
# Actually build the snap.
sg lxd -c '/snap/bin/snapcraft --use-lxd'
sudo snap install review-tools
/snap/bin/review-tools.snap-review *.snap
echo "::set-output name=snap-file::$( ls *.snap )"
- name: Upload the snap
uses: actions/upload-artifact@v2
with:
name: ${{ steps.build-snap.outputs.snap-file }}
path: ${{ steps.build-snap.outputs.snap-file }}
if-no-files-found: error

View File

@ -1,5 +1,4 @@
name: nymea-app
version: developer-build
summary: Control app for nymea
description: |
The nymea daemon is a plugin based IoT (Internet of Things) server.
@ -9,12 +8,19 @@ description: |
scenes and behaviors for your environment.
grade: stable
base: core18
base: core20
confinement: strict
adopt-info: nymea-app
architectures:
- build-on: amd64
- build-on: arm64
- build-on: armhf
apps:
nymea-app:
command: desktop-launch nymea-app
command-chain: [ bin/desktop-launch ]
command: usr/bin/nymea-app
desktop: usr/share/applications/nymea-app.desktop
plugs:
- avahi-observe
@ -55,7 +61,6 @@ parts:
plugin: qmake
source: .
after: [desktop-qt5]
project-files: [ nymea-app.pro ]
build-packages:
- execstack
- qt5-default
@ -90,3 +95,6 @@ parts:
- libavahi-common3
- qtvirtualkeyboard-plugin
- qtwayland5
override-build: |
snapcraftctl set-version $( head -n 1 ${SNAPCRAFT_PART_SRC}/version.txt )
snapcraftctl build

1
snap Symbolic link
View File

@ -0,0 +1 @@
packaging/ubuntu/snap