feat: ring shapes, auth reuse, input tests, README docs, CI improvements
Nightly Release / nightly-build (push) Has been cancelled
Code Quality / quality-checks (push) Has been cancelled
Security Scan / security-audit (push) Has been cancelled

- Add --ring-shape (circle/square/diamond/hexagon/pill) with geometry module
- Reuse PAM context across auth attempts (no reload per-keystroke)
- Proper error propagation in screenshot effects (unwrap → Result + context)
- Remove theme presets (modern/pixel/glass) and --theme flag
- Add input cooldown after failed attempt (400ms debounce)
- Add Ctrl+held peek password, Home/End/Delete cursor keys
- Add all input unit tests (23 new tests)
- Add --max-dots, feedback duration, timeout, interval config options
- Add --log-path, --auth-timeout, verifying_color config fields
- Remove unused deps: futures, gio, env_logger, num-traits, thiserror, bytemuck
- Fix media bar: remove stop button, fix art+text overlap, uniform hit areas
- Fix CI: source-only releases, nightly prereleases, dependabot groups, labeler paths
- Update issue templates with structured forms
- Add stale workflow for inactive issues/PRs
- Update README: full options table (28 flags), remove theme docs, add shapes
This commit is contained in:
2026-06-21 17:28:58 +02:00
parent db3e797e36
commit c2c093595a
25 changed files with 1610 additions and 836 deletions
@@ -0,0 +1,38 @@
name: Dependabot Automerge
on:
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: write
pull-requests: write
jobs:
automerge:
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: Fetch Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v2
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Auto-approve minor/patch updates
if: |
steps.metadata.outputs.update-type == 'version-update:semver-minor' ||
steps.metadata.outputs.update-type == 'version-update:semver-patch'
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Enable auto-merge for minor/patch updates
if: |
steps.metadata.outputs.update-type == 'version-update:semver-minor' ||
steps.metadata.outputs.update-type == 'version-update:semver-patch'
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+35
View File
@@ -0,0 +1,35 @@
name: Nightly Release
on:
push:
branches: [main, master]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
nightly-build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set version
id: version
run: |
DATE=$(date -u +%Y%m%d%H%M)
SHA=$(git rev-parse --short HEAD)
VERSION=$(grep -m1 '^version =' Cargo.toml | cut -d'"' -f2)
echo "VERSION=${VERSION}-nightly.$DATE.$SHA" >> $GITHUB_OUTPUT
- name: Create nightly release
uses: softprops/action-gh-release@v3
with:
tag_name: nightly-${{ steps.version.outputs.VERSION }}
name: Nightly Build ${{ steps.version.outputs.VERSION }}
prerelease: true
generate_release_notes: true
+15 -179
View File
@@ -5,181 +5,13 @@ on:
tags:
- 'v*'
env:
CARGO_TERM_COLOR: always
jobs:
release-build-x86:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- variant: "default"
args: ""
distro: "ubuntu"
- variant: "no-networking"
args: "--no-default-features"
distro: "ubuntu"
- variant: "default"
args: ""
distro: "debian"
- variant: "default"
args: ""
distro: "fedora"
- variant: "default"
args: ""
distro: "arch"
container: ${{ matrix.distro == 'ubuntu' && 'ubuntu:latest' || matrix.distro == 'debian' && 'debian:stable-slim' || matrix.distro == 'fedora' && 'fedora:latest' || 'archlinux:latest' }}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install system dependencies (Ubuntu/Debian)
if: matrix.distro == 'ubuntu' || matrix.distro == 'debian'
run: |
apt-get update
apt-get install -y \
curl \
llvm clang libclang-dev \
pkg-config \
libglib2.0-dev libcairo2-dev libpango1.0-dev libatk1.0-dev \
libgdk-pixbuf-2.0-dev libpam0g-dev libdbus-1-dev \
libwayland-dev libxkbcommon-dev
- name: Install system dependencies (Fedora)
if: matrix.distro == 'fedora'
run: |
dnf install -y \
curl \
llvm clang clang-devel \
pkgconfig \
glib2-devel cairo-devel cairo-gobject-devel pango-devel atk-devel \
gdk-pixbuf2-devel pam-devel dbus-devel \
wayland-devel libxkbcommon-devel
- name: Install system dependencies (Arch)
if: matrix.distro == 'arch'
run: |
pacman -Sy --noconfirm \
base-devel \
llvm clang pkgconf \
glib2 cairo pango atk gdk-pixbuf2 \
pam dbus \
wayland libxkbcommon
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Build ${{ matrix.variant }} (${{ matrix.distro }})
run: cargo build --release ${{ matrix.args }}
- name: Upload artifact
uses: actions/upload-artifact@v7
with:
name: rustlock-${{ matrix.variant }}-${{ matrix.distro }}
path: target/release/rustlock
release-build-arm64:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- variant: "default"
args: ""
target: "aarch64-unknown-linux-gnu"
- variant: "no-networking"
args: "--no-default-features"
target: "aarch64-unknown-linux-gnu"
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install cross-compilation toolchain
run: |
sudo apt-get update
sudo apt-get install -y \
curl \
llvm clang libclang-dev \
pkg-config \
libglib2.0-dev libcairo2-dev libpango1.0-dev libatk1.0-dev \
libgdk-pixbuf-2.0-dev libpam0g-dev libdbus-1-dev \
libwayland-dev libxkbcommon-dev \
gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
- name: Add ARM target
run: rustup target add aarch64-unknown-linux-gnu
- name: Configure cross-compilation linker
run: |
mkdir -p ~/.cargo
echo '[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"' >> ~/.cargo/config.toml
- name: Build ${{ matrix.variant }} (ARM64)
run: cargo build --release --target aarch64-unknown-linux-gnu ${{ matrix.args }}
- name: Upload artifact
uses: actions/upload-artifact@v7
with:
name: rustlock-${{ matrix.variant }}-arm64
path: target/aarch64-unknown-linux-gnu/release/rustlock
publish-crates:
runs-on: ubuntu-latest
needs: [release-build-x86]
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Publish to crates.io
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish
release:
runs-on: ubuntu-latest
needs: [release-build-x86, release-build-arm64, publish-crates]
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Download all artifacts
uses: actions/download-artifact@v8
with:
path: artifacts
- name: Generate checksums
working-directory: artifacts
run: |
find . -type f -name "rustlock" -exec sha256sum {} \; > SHA256SUMS.txt
cat SHA256SUMS.txt
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v7
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
git_config_global: true
git_user_name: JorySeverijnse
git_user_email: jory@severijnse.com
- name: Sign checksums
working-directory: artifacts
run: |
gpg --armor --detach-sign SHA256SUMS.txt
- uses: actions/checkout@v6
- name: Determine tag
id: tag
@@ -192,14 +24,18 @@ jobs:
name: RustLock v${{ steps.tag.outputs.VERSION }}
draft: true
prerelease: ${{ contains(github.ref_name, 'alpha') || contains(github.ref_name, 'beta') }}
files: |
artifacts/rustlock-default-ubuntu/rustlock
artifacts/rustlock-no-networking-ubuntu/rustlock
artifacts/rustlock-default-debian/rustlock
artifacts/rustlock-default-fedora/rustlock
artifacts/rustlock-default-arch/rustlock
artifacts/rustlock-default-arm64/rustlock
artifacts/rustlock-no-networking-arm64/rustlock
artifacts/SHA256SUMS.txt
artifacts/SHA256SUMS.txt.asc
generate_release_notes: true
publish-crates:
runs-on: ubuntu-latest
needs: [release]
if: secrets.CARGO_REGISTRY_TOKEN != ''
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- name: Publish to crates.io
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish
+1 -10
View File
@@ -29,7 +29,7 @@ jobs:
- name: Install security tools
uses: taiki-e/install-action@v2
with:
tool: cargo-audit,cargo-deny,cargo-cyclonedx,cargo-outdated
tool: cargo-audit,cargo-deny,cargo-outdated
- name: Run cargo audit
run: cargo audit
@@ -37,15 +37,6 @@ jobs:
- name: Run cargo deny
run: cargo deny check
- name: Generate Software Bill of Materials (SBOM)
run: cargo cyclonedx --format json --override-filename bom
- name: Upload SBOM
uses: actions/upload-artifact@v7
with:
name: sbom
path: bom.json
- name: Check for outdated dependencies
run: cargo outdated --exit-code 1 || echo "Some dependencies are outdated"
+26
View File
@@ -0,0 +1,26 @@
name: Stale Issues and PRs
on:
schedule:
- cron: '0 0 * * *' # Daily
workflow_dispatch:
jobs:
stale:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v9
with:
stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within 7 days.'
stale-pr-message: 'This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within 7 days.'
close-issue-message: 'This issue has been automatically closed due to inactivity.'
close-pr-message: 'This PR has been automatically closed due to inactivity.'
days-before-stale: 30
days-before-close: 7
stale-issue-label: 'stale'
stale-pr-label: 'stale'
exempt-issue-labels: 'enhancement,security'
exempt-pr-labels: 'security,work-in-progress'