From e928120f34fca6d28a108862537d0e6d635a6bb4 Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 12 Feb 2026 11:22:52 +1000 Subject: [PATCH 1/6] release: publish crate and release tarball --- .github/workflows/release.yml | 24 ++++++++++++++++++++++++ Cargo.toml | 5 +++++ README.md | 16 ++++++++++++++++ 3 files changed, 45 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f718fcf6..fcbdefa5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,9 +20,33 @@ jobs: cat > body.md < HERE + - name: Build release archive + run: | + set -euo pipefail + rustup toolchain install stable --profile minimal + rustup default stable + cargo build --release + + mkdir -p dist/ + tar -C target/release -czf "dist/phrog-x86_64-unknown-linux-gnu.tar.gz" phrog - uses: softprops/action-gh-release@v2 with: body_path: body.md generate_release_notes: true prerelease: ${{ steps.prerelease.outputs.prerelease }} + files: | + dist/phrog-x86_64-unknown-linux-gnu.tar.gz token: ${{ secrets.RELEASE_GITHUB_TOKEN }} + + publish-crate: + runs-on: ubuntu-latest + needs: release + if: ${{ !contains(github.ref_name, '_rc') }} + steps: + - uses: actions/checkout@v4 + - name: Publish phrog to crates.io + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + run: | + set -euo pipefail + cargo publish --locked --no-verify diff --git a/Cargo.toml b/Cargo.toml index 61ebbb7f..fba873ff 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,3 +42,8 @@ wayland-protocols-misc = { version = "0.3", features = ["client"] } wayland-protocols-wlr = { version = "0.3", features = ["client"] } tempfile = "3" serde = "1.0.217" + +[package.metadata.binstall] +bin-dir = "{ bin }{ binary-ext }" +pkg-url = "{ repo }/releases/download/v{ version }/{ name }-{ target }.tar.gz" +pkg-fmt = "tgz" diff --git a/README.md b/README.md index 682f092a..f6981bd1 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,22 @@ Want to use phrog on another distro? [Please get in touch.](#getting-help) If you want to run it manually, you'll need to build from source (see below), and then take a look at the existing packaging to understand how to wire up the necessary bits to spawn a functional greeter session under greetd. +### crates.io / cargo-install + +`phrog` is also published on crates.io, so you can install it directly with Cargo: + +```sh +cargo install phrog +``` + +If you're using [`cargo-binstall`](https://github.com/cargo-bins/cargo-binstall), this also works: + +```sh +cargo binstall phrog +``` + +`cargo-binstall` will use pre-built binaries when available and otherwise fall back to building from source. + ## Development `libphosh` 0.45 is required to build this project. From 989b694aa230b14458f0932a99e37e3a2d0b08ea Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 20 Feb 2026 14:55:11 +1000 Subject: [PATCH 2/6] Apply suggestion from @samcday --- README.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/README.md b/README.md index f6981bd1..0e8f07e6 100644 --- a/README.md +++ b/README.md @@ -63,14 +63,10 @@ If you want to run it manually, you'll need to build from source (see below), an cargo install phrog ``` -If you're using [`cargo-binstall`](https://github.com/cargo-bins/cargo-binstall), this also works: +[`cargo-binstall`](https://github.com/cargo-bins/cargo-binstall) is supported: ```sh cargo binstall phrog -``` - -`cargo-binstall` will use pre-built binaries when available and otherwise fall back to building from source. - ## Development `libphosh` 0.45 is required to build this project. From 9e3a81ac9c1c4c3a7a0a4d8abd3ed0f2e3e94fe3 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 20 Feb 2026 15:07:25 +1000 Subject: [PATCH 3/6] Update Cargo.toml --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index fba873ff..05036fc5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -45,5 +45,5 @@ serde = "1.0.217" [package.metadata.binstall] bin-dir = "{ bin }{ binary-ext }" -pkg-url = "{ repo }/releases/download/v{ version }/{ name }-{ target }.tar.gz" +pkg-url = "{ repo }/releases/download/{ version }/{ name }-{ target }.tar.gz" pkg-fmt = "tgz" From e6b1d282f4a77edf40c32736bad85194e8250f1c Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 20 Feb 2026 15:07:30 +1000 Subject: [PATCH 4/6] Update .github/workflows/release.yml --- .github/workflows/release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fcbdefa5..54c61867 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -41,7 +41,6 @@ jobs: publish-crate: runs-on: ubuntu-latest needs: release - if: ${{ !contains(github.ref_name, '_rc') }} steps: - uses: actions/checkout@v4 - name: Publish phrog to crates.io From 428a2f7c586ed8836b9c9fb23c6b41e524675760 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 20 Feb 2026 15:22:47 +1000 Subject: [PATCH 5/6] ci/release: split gnu and musl build uploads --- .github/workflows/alpine.yml | 28 +++++++++++++++--- .github/workflows/release-builds.yml | 44 ++++++++++++++++++++++++++++ .github/workflows/release.yml | 11 ------- README.md | 2 ++ 4 files changed, 70 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/release-builds.yml diff --git a/.github/workflows/alpine.yml b/.github/workflows/alpine.yml index 561ef985..4bb0b55e 100644 --- a/.github/workflows/alpine.yml +++ b/.github/workflows/alpine.yml @@ -17,9 +17,11 @@ jobs: runs-on: ubuntu-24.04${{ matrix.arch == 'aarch64' && '-arm' || '' }} strategy: matrix: - arch: - - x86_64 - - aarch64 + include: + - arch: x86_64 + target: x86_64-unknown-linux-musl + - arch: aarch64 + target: aarch64-unknown-linux-musl steps: - uses: actions/checkout@v4 # Using fork (aarch64 branch from bgilbert/setup-alpine) until jirutka/setup-alpine#11 is resolved @@ -28,7 +30,7 @@ jobs: with: arch: ${{ matrix.arch }} branch: edge - packages: alpine-sdk + packages: alpine-sdk rust cargo - name: setup env: RSA_PRIV: ${{ secrets.RSA_PRIVATE_KEY }} @@ -63,6 +65,13 @@ jobs: mv $f ${f%.apk}-${{ matrix.arch }}.apk done shell: alpine.sh --root {0} + - name: build musl binary + run: | + set -euo pipefail + cargo build --release + mkdir -p dist + tar -C target/release -czf "dist/phrog-${{ matrix.target }}.tar.gz" phrog + shell: alpine.sh --root {0} - uses: actions/upload-artifact@v4 if: matrix.arch == 'x86_64' with: @@ -72,6 +81,10 @@ jobs: with: name: packages-${{ matrix.arch }} path: ${{ steps.alpine.outputs.root-path }}/packages/phrog/${{ matrix.arch }}/*.apk + - uses: actions/upload-artifact@v4 + with: + name: release-${{ matrix.target }} + path: ${{ steps.alpine.outputs.root-path }}/dist/phrog-${{ matrix.target }}.tar.gz - name: upload .apk artifacts to release uses: softprops/action-gh-release@v2 if: github.event_name == 'release' @@ -86,3 +99,10 @@ jobs: name: ${{ github.event.release.name }} files: | ${{ steps.alpine.outputs.root-path }}/packages/APKBUILD + - name: upload musl archive to release + uses: softprops/action-gh-release@v2 + if: github.event_name == 'release' + with: + name: ${{ github.event.release.name }} + files: | + ${{ steps.alpine.outputs.root-path }}/dist/phrog-${{ matrix.target }}.tar.gz diff --git a/.github/workflows/release-builds.yml b/.github/workflows/release-builds.yml new file mode 100644 index 00000000..9484939d --- /dev/null +++ b/.github/workflows/release-builds.yml @@ -0,0 +1,44 @@ +name: release-builds + +on: + workflow_dispatch: {} + release: + types: [published] + +permissions: + contents: write + +jobs: + release-gnu: + name: release-gnu (${{ matrix.target }}) + runs-on: ubuntu-24.04${{ matrix.arch == 'aarch64' && '-arm' || '' }} + strategy: + matrix: + include: + - arch: x86_64 + target: x86_64-unknown-linux-gnu + - arch: aarch64 + target: aarch64-unknown-linux-gnu + steps: + - uses: actions/checkout@v4 + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + - name: Build + run: | + set -euo pipefail + cargo build --release + - name: Create archive + run: | + set -euo pipefail + mkdir -p dist + tar -C target/release -czf "dist/phrog-${{ matrix.target }}.tar.gz" phrog + - uses: actions/upload-artifact@v4 + with: + name: release-${{ matrix.target }} + path: dist/phrog-${{ matrix.target }}.tar.gz + - name: Upload binary archive to release + if: github.event_name == 'release' + uses: softprops/action-gh-release@v2 + with: + name: ${{ github.event.release.name }} + files: dist/phrog-${{ matrix.target }}.tar.gz diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 54c61867..f8a14ace 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,22 +20,11 @@ jobs: cat > body.md < HERE - - name: Build release archive - run: | - set -euo pipefail - rustup toolchain install stable --profile minimal - rustup default stable - cargo build --release - - mkdir -p dist/ - tar -C target/release -czf "dist/phrog-x86_64-unknown-linux-gnu.tar.gz" phrog - uses: softprops/action-gh-release@v2 with: body_path: body.md generate_release_notes: true prerelease: ${{ steps.prerelease.outputs.prerelease }} - files: | - dist/phrog-x86_64-unknown-linux-gnu.tar.gz token: ${{ secrets.RELEASE_GITHUB_TOKEN }} publish-crate: diff --git a/README.md b/README.md index 0e8f07e6..cf4fa567 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,8 @@ cargo install phrog ```sh cargo binstall phrog +``` + ## Development `libphosh` 0.45 is required to build this project. From 4daaa5029af04eab876467d697ee7a22a61a9396 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 20 Feb 2026 15:22:53 +1000 Subject: [PATCH 6/6] ci/release: use setup-rust-toolchain action --- .github/workflows/release-builds.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-builds.yml b/.github/workflows/release-builds.yml index 9484939d..27bc625a 100644 --- a/.github/workflows/release-builds.yml +++ b/.github/workflows/release-builds.yml @@ -22,7 +22,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Install Rust - uses: dtolnay/rust-toolchain@stable + uses: actions-rust-lang/setup-rust-toolchain@v1 - name: Build run: | set -euo pipefail