Skip to content

About

A github action for building Pebble Apps and Watchfaces

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

Setup Pebble SDK

A GitHub Action that sets up the Pebble (Core Devices) SDK build environment and, optionally, builds your Pebble app or watchface into a .pbw.

It behaves like setup-node / setup-go: it installs the toolchain so subsequent steps can run pebble commands, and with build: true it runs pebble build for you and reports the resulting .pbw.

Linux only. Runs on GitHub-hosted ubuntu-latest (and compatible self-hosted Linux runners). It sets up the build environment — it does not install the QEMU emulator, so pebble install --emulator / screenshots are out of scope.

Usage

Set up the SDK (no build)

steps:
  - uses: actions/checkout@v7
  - uses: levonn-dev/setup-pebble@v1.0.2
  - run: pebble build   # or any other pebble command

Set up and build a .pbw

steps:
  - uses: actions/checkout@v7
  - uses: levonn-dev/setup-pebble@v1.0.2
    id: pebble
    with:
      build: 'true'
  - uses: actions/upload-artifact@v7
    with:
      name: app-pbw
      path: ${{ steps.pebble.outputs.pbw-path }}

Build a project in a subdirectory, with a pinned SDK

steps:
  - uses: actions/checkout@v7
  - uses: levonn-dev/setup-pebble@v1.0.2
    with:
      build: 'true'
      working-directory: watchfaces/my-face
      sdk-version: '4.4'   # pin instead of "latest"

Inputs

Name Default Description
build false Run pebble build after setup to produce a .pbw.
working-directory . Project directory (contains package.json + wscript). Used only when build: true.
sdk-version latest SDK version passed to pebble sdk install.
cache true Cache ~/.pebble-sdk and the pebble-tool install across runs.

Outputs

Name Description
pbw-path Absolute path to the built .pbw. Set only when build: true.

What it does

  1. Installs the system libraries the SDK needs (libsdl2, libglib2.0, libpixman-1, zlib1g, libsndio). Node.js is assumed to be present (it is preinstalled on GitHub-hosted ubuntu-latest).
  2. Installs uv and the Pebble CLI (uv tool install --force pebble-tool --python 3.13; --force keeps the pebble shim correct across cache restores).
  3. Runs pebble sdk install <sdk-version>, which downloads the ARM toolchain and SDK into ~/.pebble-sdk.
  4. If build: true, runs pebble build in working-directory and exposes the resulting .pbw as the pbw-path output.

Caching

With cache: true (the default), the action caches ~/.pebble-sdk (SDK + toolchain) and ~/.local/share/uv (the pebble-tool install and its Python), keyed by runner OS and sdk-version.

With sdk-version: latest, the cached SDK is reused until the cache key changes. Pin sdk-version for fully reproducible builds, or set cache: false to always fetch fresh.

Used by

A typical workflow for those projects:

name: CI

on:
  push:
    branches: [main]
  pull_request:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - uses: levonn-dev/setup-pebble@v1.0.2
        id: pebble
        with:
          build: 'true'
          sdk-version: '4.9.169'
      - uses: actions/upload-artifact@v7
        with:
          name: pebble-adventure-pbw
          path: ${{ steps.pebble.outputs.pbw-path }}
          if-no-files-found: error

Example project

A minimal watchface used by this repo's test workflow lives in examples/sample-watchface. The Test setup-pebble workflow exercises both build: false (setup only) and build: true (setup + build) against it.

License

MIT © 2026 levonn-dev

About

A github action for building Pebble Apps and Watchfaces

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors