Skip to content

Commit 5061636

Browse files
committed
Improve release tooling and documentation
1 parent 956b16b commit 5061636

11 files changed

Lines changed: 1091 additions & 362 deletions

File tree

.github/workflows/ci.yml

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ jobs:
5050

5151
outputs:
5252
flatpak: ${{ steps.filter.outputs.flatpak }}
53+
release_metadata: ${{ steps.filter.outputs.release_metadata }}
5354
test: ${{ steps.filter.outputs.test }}
5455
tooling: ${{ steps.filter.outputs.tooling }}
5556
pwg: ${{ steps.filter.outputs.pwg }}
@@ -73,6 +74,7 @@ jobs:
7374
echo "tooling=true"
7475
echo "pwg=true"
7576
echo "flatpak=true"
77+
echo "release_metadata=true"
7678
} >> "$GITHUB_OUTPUT"
7779
}
7880
@@ -84,6 +86,7 @@ jobs:
8486
echo "tooling=false"
8587
echo "pwg=false"
8688
echo "flatpak=false"
89+
echo "release_metadata=false"
8790
} >> "$GITHUB_OUTPUT"
8891
exit 0
8992
fi
@@ -110,6 +113,7 @@ jobs:
110113
tooling=false
111114
pwg=false
112115
flatpak=false
116+
release_metadata=false
113117
114118
while IFS= read -r path; do
115119
case "$path" in
@@ -118,11 +122,12 @@ jobs:
118122
tooling=true
119123
pwg=true
120124
flatpak=true
125+
release_metadata=true
121126
;;
122127
README.md|pyproject.toml|MANIFEST.in|src/*|tests/*|data/*|extensions/*)
123128
test=true
124129
;;
125-
tools/check_gnome_shell_extension.py|tools/pack_gnome_shell_extension.sh)
130+
tools/check_gnome_shell_extension.py|tools/pack_gnome_shell_extension.sh|tools/prepare_release.py|tools/release_status.py)
126131
test=true
127132
;;
128133
esac
@@ -133,6 +138,12 @@ jobs:
133138
;;
134139
esac
135140
141+
case "$path" in
142+
CHANGELOG.md|README.md|MANIFEST.in|pyproject.toml|data/io.github.bhack.mini-eq.metainfo.xml|docs/development.md|docs/flathub.md|docs/release.md|docs/screenshots/README.md|tools/prepare_release.py|tools/release_status.py|tests/test_prepare_release.py|tests/test_release_status.py)
143+
release_metadata=true
144+
;;
145+
esac
146+
136147
case "$path" in
137148
.github/workflows/ci.yml|tools/check_pipewire_gobject.py|src/mini_eq/pipewire_backend.py|src/mini_eq/analyzer.py)
138149
pwg=true
@@ -151,6 +162,7 @@ jobs:
151162
echo "tooling=$tooling"
152163
echo "pwg=$pwg"
153164
echo "flatpak=$flatpak"
165+
echo "release_metadata=$release_metadata"
154166
} >> "$GITHUB_OUTPUT"
155167
156168
{
@@ -160,8 +172,31 @@ jobs:
160172
echo "- tooling: \`$tooling\`"
161173
echo "- pipewire-gobject: \`$pwg\`"
162174
echo "- flatpak: \`$flatpak\`"
175+
echo "- release metadata: \`$release_metadata\`"
163176
} >> "$GITHUB_STEP_SUMMARY"
164177
178+
release-metadata:
179+
needs: changes
180+
if: ${{ always() && !(github.event_name == 'workflow_dispatch' && inputs.smoke_only) }}
181+
runs-on: ubuntu-24.04
182+
183+
steps:
184+
- name: Require change detection
185+
if: ${{ needs.changes.result != 'success' }}
186+
run: exit 1
187+
188+
- name: Skip unchanged scope
189+
if: ${{ needs.changes.outputs.release_metadata != 'true' }}
190+
run: echo "No release metadata changes detected; skipping release metadata status check."
191+
192+
- name: Check out repository
193+
if: ${{ needs.changes.outputs.release_metadata == 'true' }}
194+
uses: actions/checkout@v6
195+
196+
- name: Check local release metadata status
197+
if: ${{ needs.changes.outputs.release_metadata == 'true' }}
198+
run: python3 tools/release_status.py --no-network
199+
165200
tooling:
166201
needs: changes
167202
if: ${{ always() && !(github.event_name == 'workflow_dispatch' && inputs.smoke_only) }}
@@ -180,6 +215,14 @@ jobs:
180215
if: ${{ needs.changes.outputs.tooling == 'true' }}
181216
uses: actions/checkout@v6
182217

218+
- name: Cache pip downloads
219+
if: ${{ needs.changes.outputs.tooling == 'true' }}
220+
uses: actions/cache@v4
221+
with:
222+
path: ~/.cache/pip
223+
key: tooling-pip-${{ runner.os }}-${{ hashFiles('pyproject.toml') }}
224+
restore-keys: tooling-pip-${{ runner.os }}-
225+
183226
- name: Install Python tooling
184227
if: ${{ needs.changes.outputs.tooling == 'true' }}
185228
run: |
@@ -213,6 +256,14 @@ jobs:
213256
if: ${{ needs.changes.outputs.test == 'true' }}
214257
uses: actions/checkout@v6
215258

259+
- name: Cache pip downloads and wheels
260+
if: ${{ needs.changes.outputs.test == 'true' }}
261+
uses: actions/cache@v4
262+
with:
263+
path: ~/.cache/pip
264+
key: test-pip-${{ runner.os }}-py3-${{ hashFiles('pyproject.toml') }}
265+
restore-keys: test-pip-${{ runner.os }}-py3-
266+
216267
- name: Install system dependencies
217268
if: ${{ needs.changes.outputs.test == 'true' }}
218269
run: |

AGENTS.md

Lines changed: 15 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ paths in ignored repo-local skills under `.agents/skills/`.
3434
- `io.github.bhack.mini-eq.yaml`: local Flatpak manifest.
3535
- `python3-dependencies.yaml`: generated Flatpak Python dependencies.
3636
- `tests/`: pytest suite for core behavior and non-visual integration seams.
37+
- `docs/development.md`: source checkout, PyPI, local Flatpak, and extended
38+
development test commands.
3739

3840
## Development Commands
3941

@@ -61,15 +63,8 @@ and no-assert tests are candidates for human review, not automatic removals.
6163
GTK virtual methods, signal callbacks, property bindings, and other framework
6264
entry points often look unused to static analysis.
6365

64-
For release/package checks:
65-
66-
```bash
67-
appstreamcli validate --no-net data/io.github.bhack.mini-eq.metainfo.xml
68-
desktop-file-validate data/io.github.bhack.mini-eq.desktop
69-
.venv/bin/python tools/check_gnome_shell_extension.py
70-
.venv/bin/python -m build
71-
.venv/bin/python -m twine check dist/*
72-
```
66+
For source install, PyPI package validation, local Flatpak builds, and extended
67+
runtime smoke commands, use `docs/development.md`.
7368

7469
The app depends on system GI/audio packages that Python packaging cannot fully
7570
install: GTK4, Libadwaita, PipeWire, a WirePlumber-managed session, and the
@@ -92,11 +87,9 @@ PipeWire/WirePlumber graph with synthetic playback and AT-SPI UI driving:
9287
MINI_EQ_RUN_LIVE_UI=1 .venv/bin/python -m pytest tests/test_mini_eq_live_ui_runtime.py -q
9388
```
9489

95-
When creating a fresh venv for pip/package validation, build pipewire-gobject in
96-
a plain wheel-build venv first, then install that wheel into a
97-
`--system-site-packages` Mini EQ venv. This keeps distro GI bindings visible at
98-
runtime without making Ubuntu/Debian `g-ir-scanner` import partial `distutils`
99-
modules from a system-site build venv.
90+
When creating a fresh venv for pip/package validation, follow
91+
`docs/development.md` so pipewire-gobject is built in a plain wheel-build venv
92+
before being installed into a `--system-site-packages` Mini EQ venv.
10093

10194
## Change Guidelines
10295

@@ -166,19 +159,13 @@ Use `docs/social-preview.png` for GitHub and social link previews. This is not a
166159
Flathub quality-check input, so it may use branded/dark promotional composition,
167160
but it should be refreshed when the public screenshot changes materially.
168161

169-
Generate the public release screenshot with deterministic demo data:
170-
171-
```bash
172-
PYTHONPATH=src python3 tools/render_demo_screenshot.py docs/screenshots/mini-eq.png
173-
PYTHONPATH=src python3 tools/render_demo_screenshot.py docs/screenshots/mini-eq-dark.png --appearance dark
174-
```
175-
176162
Do not commit screenshots that show personal device names, Bluetooth device
177163
names, usernames, hostnames, local paths, or private preset names. Prefer
178164
`tools/render_demo_screenshot.py` over desktop screenshots because it renders
179165
only the Mini EQ window from deterministic demo data. Keep the public release
180166
screenshot in the platform-default light appearance unless you are adding
181167
additional screenshots that intentionally demonstrate other appearance modes.
168+
Use `docs/screenshots/README.md` for the generation commands.
182169

183170
For visual or adaptive-layout changes, inspect deterministic screenshot
184171
matrices before considering the work done. Cover the minimum, default, narrow,
@@ -201,31 +188,16 @@ renders on light and dark backgrounds.
201188

202189
## Release And Security
203190

204-
Use `docs/release.md` as the public release checklist. Before publishing
205-
release artifacts, verify the rendered README, package URLs, issue tracker,
206-
license, screenshots, and AppStream metadata.
207-
During release preparation, verify that version-bearing files agree:
208-
`pyproject.toml`, `CHANGELOG.md`, and the AppStream release entry and screenshot
209-
URL. The package `__version__` is derived from release metadata and should not
210-
be hardcoded separately.
191+
Use `docs/release.md` as the public release checklist. Use
192+
`tools/prepare_release.py`, `tools/release_status.py`,
193+
`tools/run_release_preflight_container.sh`, and
194+
`tools/release_post_publish.py` for repeatable release checks. Keep
195+
owner-specific workflow dispatch, deployment approval, and local Flathub merge
196+
steps in ignored repo-local skills under `.agents/skills/`.
211197

212-
Before publishing artifacts, run the release preflight. Prefer the
213-
containerized wrapper when the host does not already have the `pipewire-gobject`
214-
sdist build dependencies installed:
215-
216-
```bash
217-
tools/run_release_preflight_container.sh
218-
```
219-
220-
Set `MINI_EQ_FLATHUB_MANIFEST` to a Flathub publishing manifest path when the
221-
containerized preflight should include the manifest drift check.
222198
The preflight owns the focused leak scan for `HEAD`, tracked worktree changes,
223199
and untracked non-ignored text files. Use Gitleaks as an extra check when
224-
release history or generated artifacts look suspicious:
225-
226-
```bash
227-
gitleaks git --no-banner --redact .
228-
```
200+
release history or generated artifacts look suspicious.
229201

230202
Do not push local scratch branches or local safety tags.
231203
Do not rewrite public history unless the user explicitly asks for it and accepts

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ include src/mini_eq/assets/icons/hicolor/symbolic/apps/*.svg
99
include data/*.desktop
1010
include data/*.metainfo.xml
1111
include docs/flathub.md
12+
include docs/development.md
1213
include docs/performance.md
1314
include docs/release.md
1415
include docs/social-preview.png

0 commit comments

Comments
 (0)