Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
push:
branches: [main]
workflow_call:
schedule:
# Fedora ships new kernels often; a weekly build catches an API change before a user does.
- cron: '23 4 * * 1'
Expand Down
66 changes: 66 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Release

# A version is released by pushing its tag (v1.2.3) to a commit on main. The tag must
# match PACKAGE_VERSION in driver/dkms.conf and have its section in CHANGELOG.md; the
# GitHub release is published only once the whole CI, driver build included, has passed.

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

concurrency:
group: release
cancel-in-progress: false

permissions:
contents: read

jobs:
verify:
name: Tag matches main, the DKMS version and the changelog
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false

- name: The tagged commit is on main
run: git merge-base --is-ancestor "$GITHUB_SHA" origin/main

- name: The tag is the DKMS package version
run: |
version=$(sed -n 's/^PACKAGE_VERSION="\(.*\)"$/\1/p' driver/dkms.conf)
if [ "${GITHUB_REF_NAME#v}" != "$version" ]; then
echo "::error::The tag $GITHUB_REF_NAME does not match PACKAGE_VERSION $version in driver/dkms.conf"
exit 1
fi

- name: The changelog describes the version
run: grep -q "^## \[${GITHUB_REF_NAME#v}\]" CHANGELOG.md

ci:
needs: verify
uses: ./.github/workflows/ci.yml

github-release:
name: GitHub release
needs: ci
runs-on: ubuntu-24.04
timeout-minutes: 5
permissions:
contents: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Take the release notes from the changelog
run: awk -v v="${GITHUB_REF_NAME#v}" '$0 ~ "^## \\[" v "\\]" {found=1; next} found && /^## \[/ {exit} found' CHANGELOG.md > notes.md

- name: Publish the release
env:
GH_TOKEN: ${{ github.token }}
run: gh release create "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" --verify-tag --title "$GITHUB_REF_NAME" --notes-file notes.md
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Changelog

All notable changes are documented here. The project follows [semantic versioning](https://semver.org/); the version is `PACKAGE_VERSION` in `driver/dkms.conf`.

## [1.0.0] - 2026-09-30

First release. Tested on the **Acer Predator PT316-51s (Triton 300 SE)** with Fedora and kernel 7.2.

### Added

- One-command installer and uninstaller for the patched [Linuwu-Sense](https://github.com/0x7375646F/Linuwu-Sense) driver, registered with **DKMS** so it is rebuilt on every kernel upgrade; multi-distro build dependencies (dnf, apt, pacman, zypper).
- Console commands: `turbo` (the Turbo button toggles instead of cycling profiles), `profile`, `fan`, `temps`, `battery` (80 % limit, calibration), `kb` (RGB keyboard, persistent across reboots), `usbcharge`.
- Fn+F4 fix: the keyboard-backlight key no longer dims the screen.
- CI: ShellCheck, bats tests against a fake sysfs, and a weekly build of the driver against the latest Fedora kernel.

### Fixed

- The driver builds on kernel 7.2 (`strncpy()` replaced with `memcpy()`).
- `turbo` no longer switches the wrong way when a write fails, and `turbo`, `profile` and `kb timeout` exit with an error on a failed write.

[1.0.0]: https://github.com/wobqqq/predator-sense/releases/tag/v1.0.0