Skip to content

Commit

Permalink
Merge remote branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Nokse22 committed Sep 25, 2023
2 parents 1b444d5 + c2c68f8 commit 56365dc
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/workflows/snap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
on:
push:
branches: [ "master" ]
pull_request:
workflow_dispatch:
name: Snap
permissions:
id-token: write
contents: read
jobs:
snap:
name: "Test if the Snap can be built from the latest commit in the branch"
runs-on: ubuntu-latest
steps:
- name: Checkout Git repository
uses: actions/checkout@v3
- name: Build Snap
uses: snapcore/action-build@v1
id: snapcraft-build
with:
snapcraft-args: "-v"
- uses: actions/upload-artifact@v3
with:
name: inspector-amd64-snap
path: ${{ steps.snapcraft-build.outputs.snap }}
- name: Upload and release Inspector snap with every changes
uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }}
with:
snap: ${{ steps.snapcraft-build.outputs.snap }}
release: ${{'edge'}}
2 changes: 1 addition & 1 deletion io.github.nokse22.inspector.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"app-id" : "io.github.nokse22.inspector",
"runtime" : "org.gnome.Platform",
"runtime-version" : "master",
"runtime-version" : "45",
"sdk" : "org.gnome.Sdk",
"command" : "inspector",
"finish-args" : [
Expand Down
59 changes: 59 additions & 0 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: inspector # you probably want to 'snapcraft register <name>'
base: core22 # the base snap is the execution environment for this snap
adopt-info: inspector
grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict # use 'strict' once you have the right plugs and slots
website: https://github.com/Nokse22/inspector
license: GPL-3.0
source-code: https://github.com/Nokse22/inspector
issues: https://github.com/Nokse22/inspector/issues
contact: https://github.com/Nokse22/inspector



architectures:
- build-on: amd64
- build-on: arm64
- build-on: armhf

parts:
inspector:
# See 'snapcraft plugins'
plugin: meson
source: .
parse-info: [ usr/share/appdata/io.github.nokse22.inspector.appdata.xml ]
build-packages:
- blueprint-compiler
meson-parameters:
- --prefix=/snap/inspector/current/usr
override-build: |
craftctl default
sed -e '1c#!/usr/bin/env python3' -i ${CRAFT_PART_INSTALL}/snap/inspector/current/usr/bin/inspector
chmod +x $CRAFT_PART_INSTALL/snap/inspector/current/usr/bin/inspector
organize:
snap/inspector/current: .
deps:
plugin: nil
stage-packages:
- usbutils
- pciutils

slots:
inspector:
interface: dbus
bus: session
name: io.github.nokse22.inspector

apps:
inspector:
command: usr/bin/inspector
extensions: [ gnome ]
common-id: io.github.nokse22.inspector
desktop: usr/share/applications/io.github.nokse22.inspector.desktop
environment:
PYTHONPATH: $SNAP/usr/bin/inspector:$PYTHONPATH
plugs:
- mount-observe
- hardware-observe
- network-observe
- system-observe

0 comments on commit 56365dc

Please sign in to comment.