Skip to content

chore: bump version to 0.1.2 in Cargo.toml to keep it in sync with tags #3

chore: bump version to 0.1.2 in Cargo.toml to keep it in sync with tags

chore: bump version to 0.1.2 in Cargo.toml to keep it in sync with tags #3

Workflow file for this run

name: Build and Release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
build:
name: Build applet
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
libwayland-dev \
libxkbcommon-dev \
libudev-dev \
libinput-dev \
libdbus-1-dev \
libpipewire-0.3-dev \
libclang-dev \
pkg-config
- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache Cargo registry and build
uses: actions/cache@v5
with:
path: |
~/.cargo/registry
~/.cargo/git
applet/target
key: ${{ runner.os }}-cargo-${{ hashFiles('applet/Cargo.lock', 'applet/Cargo.toml') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Verify Cargo.toml version matches tag
working-directory: applet
run: |
TAG_VERSION="${{ github.ref_name }}"
TAG_VERSION="${TAG_VERSION#v}"
CARGO_VERSION=$(grep '^version' Cargo.toml | head -1 | sed 's/version = "\(.*\)"/\1/')
echo "Tag version: $TAG_VERSION, Cargo.toml version: $CARGO_VERSION"
if [ "$TAG_VERSION" != "$CARGO_VERSION" ]; then
echo "ERROR: tag ${{ github.ref_name }} does not match Cargo.toml version $CARGO_VERSION"
exit 1
fi
- name: Build release binary
working-directory: applet
run: cargo build --release
- name: Rename binary with version tag
run: |
cp applet/target/release/vial-layer vial-layer-${{ github.ref_name }}-linux-x86_64
- name: Create GitHub Release
uses: softprops/action-gh-release@v3
with:
files: vial-layer-${{ github.ref_name }}-linux-x86_64
generate_release_notes: true