Skip to content

Initial snap with workflow - I did it again... #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/test-snap-can-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: 🧪 Snap Builds

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]

steps:
- uses: actions/checkout@v2

- uses: snapcore/action-build@v1
id: build

- uses: diddlesnaps/snapcraft-review-action@v1
with:
snap: ${{ steps.build.outputs.snap }}
isClassic: 'false'
# Plugs and Slots declarations to override default denial (requires store assertion to publish)
#plugs: ./plug-declaration.json
#slots: ./slot-declaration.json
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ This is useful when making tutorials where command line tools spew lots of outpu

Slomore is written in Rust. Binary builds are available with tagged [releases](https://github.com/popey/slomore/releases).

## Install the snap

```bash
snap install slomore
```

## Build from source

Compile using `cargo`.
Expand Down Expand Up @@ -81,4 +87,4 @@ find /bin | slomore

## Caveats

I am an open-source enthusiast and self-taught coder creating projects driven by curiosity and a love for problem-solving. The code may have bugs or sharp edges. Kindly let me know if you find one, via an [issue](https://github.com/popey/slomore/issues). Thanks.
I am an open-source enthusiast and self-taught coder creating projects driven by curiosity and a love for problem-solving. The code may have bugs or sharp edges. Kindly let me know if you find one, via an [issue](https://github.com/popey/slomore/issues). Thanks.
49 changes: 49 additions & 0 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: slomore
adopt-info: slomore
summary: A custom pager that outputs lines with a delay, allowing control over pacing.
description: |
A custom pager that outputs lines with a delay, allowing control over pacing.

license: MIT

base: core24
grade: stable
confinement: strict
compression: lzo
issues: https://github.com/popey/slomore/issues
source-code: https://github.com/popey/slomore
contact: https://github.com/popey/slomore

platforms:
amd64:
build-on: [amd64]
build-for: [amd64]
arm64:
build-on: [arm64]
build-for: [arm64]
armhf:
build-on: [armhf]
build-for: [armhf]
ppc64el:
build-on: [ppc64el]
build-for: [ppc64el]
s390x:
build-on: [s390x]
build-for: [s390x]

apps:
slomore:
command: bin/slomore

parts:
slomore:
source: https://github.com/popey/slomore
source-type: git
plugin: rust
override-pull: |
craftctl default
craftctl set version="$(git describe --tags | sed 's/^v//' | cut -d "-" -f1)"

build-packages:
- rustc
- cargo