Skip to content

Bump version to 26.9.0 (#318) #81

Bump version to 26.9.0 (#318)

Bump version to 26.9.0 (#318) #81

Workflow file for this run

# .github/workflows/release.yml
on:
push:
tags:
- "v*"
jobs:
build-release:
name: deploy
permissions:
contents: write
id-token: write
attestations: write
runs-on: ${{ matrix.os }}
env:
# For some builds, we use cross to test on 32-bit and big-endian
# systems.
CARGO: cargo
# When CARGO is set to CROSS, this is set to `--target matrix.target`.
TARGET_FLAGS: ""
# When CARGO is set to CROSS, TARGET_DIR includes matrix.target.
TARGET_DIR: ./target
# Emit backtraces on panics.
RUST_BACKTRACE: 1
strategy:
matrix:
build:
- linux
- macos
- windows
include:
- build: linux
os: ubuntu-22.04
rust: stable
target: x86_64-unknown-linux-gnu
- build: linux-musl
os: ubuntu-22.04
rust: stable
target: x86_64-unknown-linux-musl
- build: linux-arm64
os: ubuntu-22.04
rust: stable
target: aarch64-unknown-linux-gnu
- build: linux-armhf
os: ubuntu-22.04
rust: stable
target: armv7-unknown-linux-gnueabihf
- build: macos
os: macos-15
rust: stable
target: x86_64-apple-darwin
mcpb_platform: darwin
mcpb_alias: macos-x64
- build: macos-aarch64
os: macos-15
rust: stable
target: aarch64-apple-darwin
mcpb_platform: darwin
mcpb_alias: macos-arm64
- build: windows
os: ubuntu-22.04
rust: stable
target: x86_64-pc-windows-gnu
mcpb_platform: win32
mcpb_alias: windows-x64
- build: windows-32
os: ubuntu-22.04
rust: stable
target: i686-pc-windows-gnu
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
- name: Use Cross
shell: bash
run: |
cargo install cross
echo "CARGO=cross" >> $GITHUB_ENV
echo "TARGET_FLAGS=--target ${{ matrix.target }}" >> $GITHUB_ENV
echo "TARGET_DIR=./target/${{ matrix.target }}" >> $GITHUB_ENV
- name: Show command used for Cargo
run: |
echo "cargo command is: ${{ env.CARGO }}"
echo "target flag is: ${{ env.TARGET_FLAGS }}"
echo "target dir is: ${{ env.TARGET_DIR }}"
- name: Build release binary
run: ${{ env.CARGO }} build --verbose --release ${{ env.TARGET_FLAGS }}
- name: Strip release binary (linux and macos)
if: matrix.build == 'linux' || matrix.build == 'macos'
run: strip "target/${{ matrix.target }}/release/screenly"
- name: Package
shell: bash
run: |
cd target/${{ matrix.target }}/release
if [[ "${{ matrix.build }}" == windows* ]]; then
zip ../../../screenly-cli-${{ matrix.target }}.zip screenly.exe
else
tar czvf ../../../screenly-cli-${{ matrix.target }}.tar.gz screenly
fi
cd -
# Only desktop targets are bundled: Claude Desktop runs on macOS and Windows.
- name: Package MCP Bundle
if: matrix.mcpb_platform != ''
shell: bash
run: |
set -euo pipefail
mkdir -p mcpb-build/server
cp mcpb/README.md mcpb/icon.png mcpb-build/
if [[ "${{ matrix.build }}" == windows* ]]; then
cp "target/${{ matrix.target }}/release/screenly.exe" mcpb-build/server/
else
cp "target/${{ matrix.target }}/release/screenly" mcpb-build/server/
fi
# The committed manifest carries a 0.0.0 placeholder so the version cannot
# drift from Cargo.toml; the tag is the single source of truth.
# Windows packs screenly.exe, so entry_point/command must match the artifact.
if [[ "${{ matrix.build }}" == windows* ]]; then
entry_point="server/screenly.exe"
else
entry_point="server/screenly"
fi
jq --arg version "${GITHUB_REF_NAME#v}" \
--arg platform "${{ matrix.mcpb_platform }}" \
--arg entry_point "$entry_point" \
'.version = $version
| .compatibility.platforms = [$platform]
| .server.entry_point = $entry_point
| .server.mcp_config.command = ("${__dirname}/" + $entry_point)
| del(.server.mcp_config.platform_overrides)' \
mcpb/manifest.json > mcpb-build/manifest.json
npx --yes @anthropic-ai/mcpb@2.1.2 pack \
mcpb-build "screenly-cli-${{ matrix.target }}.mcpb"
# Friendlier alias next to the rustc-target name (both are published).
cp "screenly-cli-${{ matrix.target }}.mcpb" \
"screenly-${{ matrix.mcpb_alias }}.mcpb"
- name: Publish
uses: softprops/action-gh-release@v1
# TODO: if any of the build step fails, the release should be deleted.
with:
files: "screenly*"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Attest
uses: actions/attest-build-provenance@v1
with:
subject-path: "${{ github.workspace }}/screenly*"
build-docker-image:
environment: master
name: docker
needs: build-release
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Build container
run: |
docker build . \
--build-arg "RELEASE=$GITHUB_REF_NAME" \
-t "screenly/cli:$GITHUB_REF_NAME"
- name: Tag container
run: |
docker tag \
"screenly/cli:$GITHUB_REF_NAME" \
"screenly/cli:latest"
- name: Login to DockerHub
if: success() && github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push Docker containers
run: |
docker push "screenly/cli:$GITHUB_REF_NAME"
docker push "screenly/cli:latest"