Skip to content

Commit 1562917

Browse files
bobokungithub-actions[bot]actions-userbakerboy448pre-commit-ci[bot]
authored
4.5.5 (#922)
# Improvements - **ci(docker)**: add OCI labels and build metadata to Docker images - **Web UI**: Show an "Update available" badge next to the version and a toast notification when a newer version is detected - **Web UI**: Add integrated docs with collapsible sections - **ci(build)**: Publish to PyPI - **Category**: Allow category changes regardless of the "Category Update All" status (Fixes #913) # Bug Fixes - Fixes container hanging when using run command with QBT_RUN flag (Fixes #911) - Fixes bug on interval scheduler not displaying the correct next run time - Fix bug on webAPI requests not being queued correctly when called during a scheduled run **Full Changelog**: v4.5.4...v4.5.5 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Actionbot <actions@github.com> Co-authored-by: bakerboy448 <55419169+bakerboy448@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: ineednewpajamas <73252768+ineednewpajamas@users.noreply.github.com>
1 parent 1e12a16 commit 1562917

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2507
-729
lines changed

.github/workflows/develop.yml

Lines changed: 75 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ jobs:
6969
ADD_SAMPLE_CFG="config/config.yml.sample${{ steps.sep.outputs.SEP }}config"
7070
ADD_LOGO="icons/qbm_logo.png${{ steps.sep.outputs.SEP }}."
7171
ADD_VERSION="VERSION${{ steps.sep.outputs.SEP }}."
72+
ADD_DOCS="docs${{ steps.sep.outputs.SEP }}docs"
7273
ICON_ARG=""
7374
if [[ "${{ runner.os }}" == "Windows" ]]; then
7475
ICON_ARG=--icon=icons/qbm_logo.ico
@@ -90,6 +91,7 @@ jobs:
9091
--add-data "$ADD_SAMPLE_CFG" \
9192
--add-data "$ADD_LOGO" \
9293
--add-data "$ADD_VERSION" \
94+
--add-data "$ADD_DOCS" \
9395
$ICON_ARG \
9496
"${ENTRY}"
9597
@@ -186,13 +188,64 @@ jobs:
186188
# Run cargo check to trigger build script and update version files
187189
cargo check
188190
189-
- name: Build Tauri app
191+
- name: Install Tauri CLI
190192
working-directory: desktop/tauri/src-tauri
191193
shell: bash
192194
run: |
193195
# Install Tauri 2 CLI (project migrated to Tauri v2 config & deps)
194196
cargo install tauri-cli --version ^2 --locked --force
195197
198+
- name: Build Tauri app (initial attempt)
199+
working-directory: desktop/tauri/src-tauri
200+
shell: bash
201+
run: |
202+
# Build with explicit bundle targets for this platform
203+
if [[ "${{ runner.os }}" == "Windows" ]]; then
204+
cargo tauri build --target x86_64-pc-windows-msvc --bundles nsis
205+
elif [[ "${{ runner.os }}" == "macOS" ]]; then
206+
cargo tauri build --bundles app,dmg
207+
else
208+
cargo tauri build --bundles deb
209+
fi
210+
continue-on-error: true
211+
id: tauri-build
212+
213+
- name: Wait before retry (macOS DMG recovery)
214+
if: steps.tauri-build.outcome == 'failure' && runner.os == 'macOS'
215+
run: sleep 30
216+
shell: bash
217+
218+
- name: Wait before retry (build recovery)
219+
if: steps.tauri-build.outcome == 'failure'
220+
run: sleep 30
221+
shell: bash
222+
223+
- name: Retry Tauri build on failure (attempt 2)
224+
if: steps.tauri-build.outcome == 'failure'
225+
working-directory: desktop/tauri/src-tauri
226+
shell: bash
227+
run: |
228+
# Build with explicit bundle targets for this platform
229+
if [[ "${{ runner.os }}" == "Windows" ]]; then
230+
cargo tauri build --target x86_64-pc-windows-msvc --bundles nsis
231+
elif [[ "${{ runner.os }}" == "macOS" ]]; then
232+
cargo tauri build --bundles app,dmg
233+
else
234+
cargo tauri build --bundles deb
235+
fi
236+
continue-on-error: true
237+
id: tauri-build-retry1
238+
239+
- name: Wait before final retry (build recovery)
240+
if: steps.tauri-build-retry1.outcome == 'failure'
241+
run: sleep 30
242+
shell: bash
243+
244+
- name: Final retry Tauri build on failure (attempt 3)
245+
if: steps.tauri-build-retry1.outcome == 'failure'
246+
working-directory: desktop/tauri/src-tauri
247+
shell: bash
248+
run: |
196249
# Build with explicit bundle targets for this platform
197250
if [[ "${{ runner.os }}" == "Windows" ]]; then
198251
cargo tauri build --target x86_64-pc-windows-msvc --bundles nsis
@@ -202,6 +255,13 @@ jobs:
202255
cargo tauri build --bundles deb
203256
fi
204257
258+
- name: Fail if all Tauri build attempts failed
259+
if: steps.tauri-build.outcome == 'failure' && steps.tauri-build-retry1.outcome == 'failure'
260+
shell: bash
261+
run: |
262+
echo "❌ Tauri build failed after all attempts"
263+
exit 1
264+
205265
- name: Set BUILD_ARCH for artifact naming
206266
shell: bash
207267
run: |
@@ -332,36 +392,6 @@ jobs:
332392
if-no-files-found: error
333393
compression-level: 6
334394

335-
- name: Clean up temporary build artifacts
336-
uses: actions/github-script@v7
337-
with:
338-
script: |
339-
// Get all artifacts from this workflow run
340-
const artifacts = await github.rest.actions.listWorkflowRunArtifacts({
341-
owner: context.repo.owner,
342-
repo: context.repo.repo,
343-
run_id: context.runId,
344-
});
345-
346-
// Delete temporary build artifacts, keep only the final release assets
347-
for (const artifact of artifacts.data.artifacts) {
348-
if (artifact.name.startsWith('build-outputs-')) {
349-
console.log(`Deleting temporary artifact: ${artifact.name}`);
350-
try {
351-
await github.rest.actions.deleteArtifact({
352-
owner: context.repo.owner,
353-
repo: context.repo.repo,
354-
artifact_id: artifact.id,
355-
});
356-
console.log(`✓ Successfully deleted: ${artifact.name}`);
357-
} catch (error) {
358-
console.log(`⚠️ Failed to delete ${artifact.name}: ${error.message}`);
359-
}
360-
} else {
361-
console.log(`✓ Keeping final artifact: ${artifact.name}`);
362-
}
363-
}
364-
365395
docker-develop:
366396
runs-on: ubuntu-latest
367397

@@ -406,14 +436,27 @@ jobs:
406436
id: buildx
407437
uses: docker/setup-buildx-action@v3
408438

439+
- name: Read version from VERSION file
440+
id: get_version
441+
run: echo "APP_VERSION=$(cat VERSION)" >> $GITHUB_OUTPUT
442+
443+
- name: Set build metadata
444+
id: build_meta
445+
run: |
446+
echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
447+
echo "VCS_REF=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
448+
409449
- name: Build and push
410450
id: docker_build
411451
uses: docker/build-push-action@v6
412452
with:
413453
context: ./
414454
file: ./Dockerfile
415455
build-args: |
416-
"BRANCH_NAME=develop"
456+
BRANCH_NAME=develop
457+
APP_VERSION=${{ steps.get_version.outputs.APP_VERSION }}
458+
BUILD_DATE=${{ steps.build_meta.outputs.BUILD_DATE }}
459+
VCS_REF=${{ steps.build_meta.outputs.VCS_REF }}
417460
platforms: linux/amd64,linux/arm64,linux/arm/v7
418461
push: true
419462
tags: |

.github/workflows/pypi-publish.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: PyPI Publish
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
workflow_dispatch:
8+
inputs:
9+
test_pypi:
10+
description: 'Publish to Test PyPI instead of PyPI'
11+
required: false
12+
default: false
13+
type: boolean
14+
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: true
18+
19+
jobs:
20+
pypi-publish:
21+
runs-on: ubuntu-latest
22+
permissions:
23+
contents: read
24+
id-token: write # Required for trusted publishing to PyPI
25+
steps:
26+
- name: Check Out Repo
27+
uses: actions/checkout@v5
28+
29+
- name: Setup Python
30+
uses: actions/setup-python@v5
31+
with:
32+
python-version: '3.12'
33+
34+
- name: Install build dependencies
35+
run: |
36+
python -m pip install --upgrade pip
37+
python -m pip install build twine
38+
39+
- name: Build package
40+
run: python -m build
41+
42+
- name: Verify package
43+
run: |
44+
python -m twine check dist/*
45+
ls -la dist/
46+
47+
- name: Publish to Test PyPI
48+
if: ${{ github.event.inputs.test_pypi == 'true' }}
49+
uses: pypa/gh-action-pypi-publish@release/v1
50+
with:
51+
repository-url: https://test.pypi.org/legacy/
52+
# Option 1: Use trusted publishing (recommended)
53+
# Repository must be configured in Test PyPI with GitHub as trusted publisher
54+
# Option 2: Use API token (uncomment the line below and comment out the trusted publishing)
55+
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
56+
verbose: true
57+
skip-existing: true
58+
59+
- name: Publish to PyPI
60+
if: ${{ github.event.inputs.test_pypi != 'true' }}
61+
uses: pypa/gh-action-pypi-publish@release/v1
62+
with:
63+
# Option 1: Use trusted publishing (recommended)
64+
# Repository must be configured in PyPI with GitHub as trusted publisher
65+
# Option 2: Use API token (uncomment the line below and comment out the trusted publishing)
66+
# password: ${{ secrets.PYPI_API_TOKEN }}
67+
verbose: true
68+
skip-existing: true

.github/workflows/update-supported-versions.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,19 @@ jobs:
4747
run: |
4848
source .venv/bin/activate
4949
python scripts/update-readme-version.py ${{ github.event.inputs.targetBranch || github.ref_name }}
50+
- name: Check for SUPPORTED_VERSIONS changes
51+
id: detect-changes
52+
run: |
53+
if git diff --name-only | grep -q '^SUPPORTED_VERSIONS\.json$'; then
54+
echo "SUPPORTED_VERSIONS.json changed."
55+
echo "changed=true" >> $GITHUB_OUTPUT
56+
else
57+
echo "No changes to SUPPORTED_VERSIONS.json. Skipping remainder of workflow."
58+
echo "changed=false" >> $GITHUB_OUTPUT
59+
fi
5060
5161
- name: Update develop versions
52-
if: ${{ github.event.inputs.targetBranch || github.ref_name == 'develop' }}
62+
if: ${{ steps.detect-changes.outputs.changed == 'true' && (github.event.inputs.targetBranch || github.ref_name) == 'develop' }}
5363
id: get-develop-version
5464
run: |
5565
# Run the script and capture its output
@@ -63,6 +73,7 @@ jobs:
6373
echo "Captured Version: $version"
6474
6575
- name: Create Pull Request
76+
if: ${{ steps.detect-changes.outputs.changed == 'true' }}
6677
id: create-pr
6778
uses: peter-evans/create-pull-request@v7
6879
with:

.github/workflows/version.yml

Lines changed: 76 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Version Release
22

33
on:
4-
create:
4+
push:
55
tags:
66
- v*
77

@@ -68,6 +68,7 @@ jobs:
6868
ADD_SAMPLE_CFG="config/config.yml.sample${{ steps.sep.outputs.SEP }}config"
6969
ADD_LOGO="icons/qbm_logo.png${{ steps.sep.outputs.SEP }}."
7070
ADD_VERSION="VERSION${{ steps.sep.outputs.SEP }}."
71+
ADD_DOCS="docs${{ steps.sep.outputs.SEP }}docs"
7172
ICON_ARG=""
7273
if [[ "${{ runner.os }}" == "Windows" ]]; then
7374
ICON_ARG=--icon=icons/qbm_logo.ico
@@ -89,6 +90,7 @@ jobs:
8990
--add-data "$ADD_SAMPLE_CFG" \
9091
--add-data "$ADD_LOGO" \
9192
--add-data "$ADD_VERSION" \
93+
--add-data "$ADD_DOCS" \
9294
$ICON_ARG \
9395
"${ENTRY}"
9496
@@ -185,13 +187,64 @@ jobs:
185187
# Run cargo check to trigger build script and update version files
186188
cargo check
187189
188-
- name: Build Tauri app
190+
- name: Build Tauri CLI
189191
working-directory: desktop/tauri/src-tauri
190192
shell: bash
191193
run: |
192194
# Install Tauri 2 CLI (project migrated to Tauri v2 config & deps)
193195
cargo install tauri-cli --version ^2 --locked --force
194196
197+
- name: Build Tauri app (initial attempt)
198+
working-directory: desktop/tauri/src-tauri
199+
shell: bash
200+
run: |
201+
# Build with explicit bundle targets for this platform
202+
if [[ "${{ runner.os }}" == "Windows" ]]; then
203+
cargo tauri build --target x86_64-pc-windows-msvc --bundles nsis
204+
elif [[ "${{ runner.os }}" == "macOS" ]]; then
205+
cargo tauri build --bundles app,dmg
206+
else
207+
cargo tauri build --bundles deb
208+
fi
209+
continue-on-error: true
210+
id: tauri-build
211+
212+
- name: Wait before retry (macOS DMG recovery)
213+
if: steps.tauri-build.outcome == 'failure' && runner.os == 'macOS'
214+
run: sleep 30
215+
shell: bash
216+
217+
- name: Wait before retry (build recovery)
218+
if: steps.tauri-build.outcome == 'failure'
219+
run: sleep 30
220+
shell: bash
221+
222+
- name: Retry Tauri build on failure (attempt 2)
223+
if: steps.tauri-build.outcome == 'failure'
224+
working-directory: desktop/tauri/src-tauri
225+
shell: bash
226+
run: |
227+
# Build with explicit bundle targets for this platform
228+
if [[ "${{ runner.os }}" == "Windows" ]]; then
229+
cargo tauri build --target x86_64-pc-windows-msvc --bundles nsis
230+
elif [[ "${{ runner.os }}" == "macOS" ]]; then
231+
cargo tauri build --bundles app,dmg
232+
else
233+
cargo tauri build --bundles deb
234+
fi
235+
continue-on-error: true
236+
id: tauri-build-retry1
237+
238+
- name: Wait before final retry (build recovery)
239+
if: steps.tauri-build-retry1.outcome == 'failure'
240+
run: sleep 30
241+
shell: bash
242+
243+
- name: Final retry Tauri build on failure (attempt 3)
244+
if: steps.tauri-build-retry1.outcome == 'failure'
245+
working-directory: desktop/tauri/src-tauri
246+
shell: bash
247+
run: |
195248
# Build with explicit bundle targets for this platform
196249
if [[ "${{ runner.os }}" == "Windows" ]]; then
197250
cargo tauri build --target x86_64-pc-windows-msvc --bundles nsis
@@ -201,6 +254,13 @@ jobs:
201254
cargo tauri build --bundles deb
202255
fi
203256
257+
- name: Fail if all Tauri build attempts failed
258+
if: steps.tauri-build.outcome == 'failure' && steps.tauri-build-retry1.outcome == 'failure'
259+
shell: bash
260+
run: |
261+
echo "❌ Tauri build failed after all attempts"
262+
exit 1
263+
204264
- name: Set BUILD_ARCH for artifact naming
205265
shell: bash
206266
run: |
@@ -400,12 +460,26 @@ jobs:
400460
id: get_version
401461
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
402462

463+
- name: Read version from VERSION file
464+
id: get_app_version
465+
run: echo "APP_VERSION=$(cat VERSION)" >> $GITHUB_OUTPUT
466+
467+
- name: Set build metadata
468+
id: build_meta
469+
run: |
470+
echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
471+
echo "VCS_REF=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
472+
403473
- name: Build and push
404474
id: docker_build
405475
uses: docker/build-push-action@v6
406476
with:
407477
context: ./
408478
file: ./Dockerfile
479+
build-args: |
480+
APP_VERSION=${{ steps.get_app_version.outputs.APP_VERSION }}
481+
BUILD_DATE=${{ steps.build_meta.outputs.BUILD_DATE }}
482+
VCS_REF=${{ steps.build_meta.outputs.VCS_REF }}
409483
platforms: linux/amd64,linux/arm64,linux/arm/v7
410484
push: true
411485
tags: |

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ qbit_manage.egg-info/
1313
.tox
1414
*.env
1515
**/build
16+
dist/
1617
.roo*
1718
memory-bank
1819
**/src-tauri/gen

0 commit comments

Comments
 (0)