Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
253 commits
Select commit Hold shift + click to select a range
560a427
instructions
damachine Sep 2, 2025
a9fdf1f
feat: comprehensive security hardening and buffer overflow protection
damachine Sep 2, 2025
cfda4b0
All Codacy security findings resolved while maintaining functionality.
damachine Sep 2, 2025
39602c6
bump version to 1.33
damachine Sep 2, 2025
9d04cc6
fix: include project headers in .h files
damachine Sep 2, 2025
04e2f79
bump version to 1.34
damachine Sep 2, 2025
876f270
bump version to 1.35
damachine Sep 2, 2025
069dd0a
bump version to 1.36
damachine Sep 2, 2025
be76ebe
workflows
damachine Sep 3, 2025
b1001a2
fix: cppcheck missingIncludeSystem massage
damachine Sep 3, 2025
0129bb1
bump version to 1.37
damachine Sep 3, 2025
fccfe27
bump version to 1.38
damachine Sep 3, 2025
97bba61
bump version to 1.39
damachine Sep 3, 2025
8fdb95a
refactor: eliminate code duplication in display.c temperature bar ren…
damachine Sep 3, 2025
97e453d
refactor: eliminate JSON device type extraction duplication
damachine Sep 3, 2025
5f3d16d
bump: version to 1.40
damachine Sep 3, 2025
5723795
refactor: dramatically reduce cyclomatic complexity in config.c
damachine Sep 3, 2025
08a379a
refactor: massive cyclomatic complexity reduction in config.c
damachine Sep 3, 2025
339ba45
refactor: massive cyclomatic complexity reduction in config.c
damachine Sep 3, 2025
56205b4
"refactor: optimize set_color_defaults() with lookup table
damachine Sep 3, 2025
b347ac7
refactor: optimize complexity of cooler control logic
damachine Sep 3, 2025
a3063b8
refactor: reduce display.c complexity
damachine Sep 3, 2025
e96118f
fix: revert display.c changes
damachine Sep 3, 2025
c4827f7
bump version to 1.41
damachine Sep 3, 2025
5d487f5
README
damachine Sep 4, 2025
49199ce
refactor: temperature display vertical adjustment constants
damachine Sep 4, 2025
a560887
workflows
damachine Sep 4, 2025
fd84735
bump version to 1.42
damachine Sep 4, 2025
b37e76f
workflows
damachine Sep 4, 2025
5692542
bump version to 1.44
damachine Sep 4, 2025
7928f64
bump version to 1.45
damachine Sep 4, 2025
58586e5
workflows
damachine Sep 4, 2025
abb0131
refactor: minimize complex code in config.c
damachine Sep 5, 2025
a9286e8
refactor: in config.c
damachine Sep 5, 2025
5a13270
fix: correct pointer arithmetic in config.c
damachine Sep 5, 2025
0da301f
refactor: Dramatically reduce code complexity and eliminate duplication
damachine Sep 5, 2025
1fb05e1
refactor: coolercontrol.c - use config struct directly
damachine Sep 5, 2025
c1f7759
refactor: Add macros for error handling and cleanup in coolercontrol.c
damachine Sep 5, 2025
52211c6
fix: coolercontrol.c
damachine Sep 5, 2025
0429065
bump version to 1.46
damachine Sep 5, 2025
54a2fa4
bump version to 1.47
damachine Sep 5, 2025
f73e618
README
damachine Sep 6, 2025
b93159b
README
damachine Sep 6, 2025
2802954
deprecate AUR-README.md file and references to it in Makefile and PKG…
damachine Sep 6, 2025
7a77c90
bump version to 1.48
damachine Sep 6, 2025
4a32329
Initial plan (#3)
damachine Sep 6, 2025
b6fd1a4
refactor: simplify configuration parsing with lookup tables and reduc…
damachine Sep 6, 2025
bed7f28
Merge branch 'main' of https://github.com/damachine/coolerdash
damachine Sep 6, 2025
aeba72f
refactor: reduce cyclomatic complexity in coolercontrol.c
damachine Sep 6, 2025
625a543
feat: all improvements and refactorings since v1.48
damachine Sep 6, 2025
7e7e3e0
bump version to 1.49
damachine Sep 6, 2025
9e6b4e1
Merge branch 'main' of https://github.com/damachine/coolerdash
damachine Sep 6, 2025
5a2f8d0
bump version to 1.50
damachine Sep 6, 2025
cac0854
feat: all improvements and refactorings since v1.50
damachine Sep 6, 2025
b38c686
README
damachine Sep 7, 2025
91da165
README (#4)
damachine Sep 7, 2025
da9642e
README
damachine Sep 7, 2025
481500b
README
damachine Sep 7, 2025
0f72c6f
README
damachine Sep 7, 2025
3e495f0
README
damachine Sep 8, 2025
27f010b
README (#5)
damachine Sep 8, 2025
e545b08
README
damachine Sep 8, 2025
a9dc67d
Merge branch 'main' of https://github.com/damachine/coolerdash
damachine Sep 8, 2025
7a1a8e7
README
damachine Sep 8, 2025
c8e76de
Revise README for clarity and detail
damachine Sep 8, 2025
9c49fbd
Revise README for clarity and detail (#6)
damachine Sep 8, 2025
4c6d545
Improve compatibility instructions formatting
damachine Sep 8, 2025
810b6e0
Improve compatibility instructions formatting (#7)
damachine Sep 8, 2025
05a813f
README
damachine Sep 8, 2025
b85c050
README
damachine Sep 8, 2025
d97fb71
README
damachine Sep 8, 2025
e3a6b8b
README (#8)
damachine Sep 8, 2025
d64d6e4
docs: add link to supported devices list and device confirmation issu…
damachine Sep 8, 2025
440f7bc
Merge branch 'main' of https://github.com/damachine/coolerdash
damachine Sep 8, 2025
a5c4a9e
README
damachine Sep 8, 2025
9ef21e8
bump to version 1.51
damachine Sep 8, 2025
4428050
Change headings from H1 to H2 in devices.md
damachine Sep 8, 2025
d5682d3
Change headings from H1 to H2 in devices.md (#11)
damachine Sep 8, 2025
a2558d0
Revise LCD support details and confirmation instructions
damachine Sep 8, 2025
239a9a4
Update device confirmation issue wording
damachine Sep 8, 2025
49c06aa
Update device confirmation issue wording (#13)
damachine Sep 8, 2025
25f9262
add: CODE_OF_CONDUCT.md
damachine Sep 9, 2025
5437593
Merge branch 'main' of https://github.com/damachine/coolerdash
damachine Sep 9, 2025
9d4fbe3
CODE_OF_CONDUCT.md
damachine Sep 9, 2025
57999d6
add: SECURITY.md
damachine Sep 9, 2025
3f39728
add: CONTRIBUTING.md
damachine Sep 9, 2025
914e3ec
Remove custom funding options
damachine Sep 9, 2025
4d554a0
Remove funding options (#15)
damachine Sep 9, 2025
32e3614
README
damachine Sep 9, 2025
1f4b5d7
README
damachine Sep 9, 2025
a910961
fix: resolve TOCTOU race condition in PID file creation
damachine Sep 10, 2025
6659833
bump version to 1.52
damachine Sep 10, 2025
4063bcf
bump version to 1.53
damachine Sep 10, 2025
9aa9aa9
bump version to 1.54
damachine Sep 10, 2025
f2ef36a
fix: bump version to 1.55
damachine Sep 10, 2025
04ec340
bump version to 1.56
damachine Sep 10, 2025
c0c275f
Code of Conduct for coolerdash
damachine Sep 10, 2025
c4e40e4
Merge pull request #17 from damachine/damachine-patch-1
damachine Sep 10, 2025
1a0e0c2
README
damachine Sep 11, 2025
b506535
Merge branch 'main' of https://github.com/damachine/coolerdash
damachine Sep 11, 2025
2cd85df
README
damachine Sep 11, 2025
58e58a5
README
damachine Sep 11, 2025
d31ecc8
README
damachine Sep 11, 2025
a6bc1af
README
damachine Sep 11, 2025
a32267b
README
damachine Sep 11, 2025
9f6ec2c
Update project title in README.md
damachine Sep 11, 2025
7c73b8c
Update README header to use markdown formatting
damachine Sep 11, 2025
f11681e
Merge pull request #19 from damachine/damachine-patch-1
damachine Sep 11, 2025
2b7c223
README
damachine Sep 11, 2025
1a74045
docs: add more details to README
damachine Sep 11, 2025
bfc100e
Update project title in README.md
damachine Sep 11, 2025
6a521a5
bump version to 1.57
damachine Sep 12, 2025
f9f02ce
instructions
damachine Sep 12, 2025
a622520
Add Codacy security scan workflow (#22)
damachine Sep 12, 2025
5815b44
fix: resolve vulnerabilities in file operations
damachine Sep 12, 2025
ab71c67
Merge branch 'main' of https://github.com/damachine/coolerdash
damachine Sep 12, 2025
d4c1e21
Delete instructions (#23)
damachine Sep 12, 2025
23951fe
bump version to 1.58
damachine Sep 12, 2025
08b800b
chore: remove dependency on coolercontrol-liquid.service and prepare …
damachine Sep 13, 2025
43339e3
bumps the version to 1.59
damachine Sep 13, 2025
3c4a82a
Fix typo in coolerdash.service documentation (#28)
damachine Sep 14, 2025
b99812c
Add Codacy security scan workflow (#30)
damachine Sep 14, 2025
a513085
bump VERSION to 1.60
damachine Sep 14, 2025
8b31607
Merge branch 'main' of https://github.com/damachine/coolerdash
damachine Sep 14, 2025
0d13457
feat: add Codacy configuration to increase function length limit
damachine Sep 14, 2025
adbcdb3
Merge pull request #34 from damachine/patch-5
damachine Sep 14, 2025
a773160
fix: remove codacy config file
damachine Sep 14, 2025
a13d6b5
feat: improve configuration files and documentation
damachine Sep 14, 2025
9ed7513
Merge pull request #35 from damachine/patch-main
damachine Sep 14, 2025
d283956
.gitignore
damachine Sep 14, 2025
3951fbb
bump version to 1.61
damachine Sep 14, 2025
585cf2f
add gitlab sync ci cd file
damachine Sep 14, 2025
5e591c8
gitlab CI/CD Pipeline added
damachine Sep 14, 2025
b648c48
bumps version to 1.62
damachine Sep 14, 2025
f2fe925
feat: add GitHub to GitLab sync workflow
damachine Sep 14, 2025
4f220df
Update project title for clarity
damachine Sep 15, 2025
af39cac
Merge pull request #36 from damachine/damachine-patch-1
damachine Sep 15, 2025
3788af2
add: banner image
damachine Sep 15, 2025
545156f
Merge pull request #37 from damachine/banner
damachine Sep 15, 2025
78bcbd4
fix: add Codacy configuration to resolve analysis issues
damachine Sep 15, 2025
2e5bbaf
Merge pull request #38 from damachine/patch-1
damachine Sep 15, 2025
5243cd3
fix:: typo in codacy configuration file
damachine Sep 15, 2025
79f8d61
bump version to 1.63
damachine Sep 15, 2025
8136015
bump version to 1.67
damachine Sep 17, 2025
c2cc7c1
ci: optimize GitHub Actions workflow for latest distributions
damachine Sep 17, 2025
7b31f1c
docs: Update supported distributions in install workflow
damachine Sep 17, 2025
27fb29d
fix: warn in config.md
damachine Sep 17, 2025
86faf86
bump version to 1.68
damachine Sep 17, 2025
af2c050
docs: add more details to README
damachine Sep 18, 2025
4848535
docs: refactor README
damachine Sep 20, 2025
603865a
docs: README.md fix
damachine Sep 20, 2025
f886132
Update section headers in README.md
damachine Sep 20, 2025
21e30f2
Merge pull request #47 from damachine/damachine-patch-1
damachine Sep 20, 2025
f1aa5c3
bump version to 1.69
damachine Sep 20, 2025
d62d04a
Merge branch 'main' of https://github.com/damachine/coolerdash
damachine Sep 20, 2025
dda0d51
bumps version to 1.70
damachine Sep 20, 2025
afa3b7a
docs: README refactored and improved
damachine Sep 21, 2025
41d1b58
docs: README.md
damachine Sep 21, 2025
8fb6b28
Fix formatting and consistency in README.md
damachine Sep 21, 2025
893dea0
Merge pull request #48 from damachine/damachine-patch-1
damachine Sep 21, 2025
ea6a64c
Improve note formatting in README
damachine Sep 21, 2025
d792785
Merge pull request #49 from damachine/damachine-patch-1
damachine Sep 21, 2025
a80e88f
Update usage section to advanced usage
damachine Sep 21, 2025
f57b84e
Merge pull request #50 from damachine/damachine-patch-1
damachine Sep 21, 2025
a7cf652
docs: add more details to README
damachine Sep 21, 2025
d5b0ad5
Merge branch 'main' of https://github.com/damachine/coolerdash
damachine Sep 21, 2025
c7fe4f1
docs: README
damachine Sep 21, 2025
e3f46c9
docs: fix README typos
damachine Sep 21, 2025
9a82f90
docs: README
damachine Sep 21, 2025
eaa735e
bump VERSION to 1.71
damachine Sep 21, 2025
23b39e3
docs: refactor README troubleshooting section
damachine Sep 21, 2025
35bcd8c
docs: style updates
damachine Sep 21, 2025
2d54ac5
docs: update README
damachine Sep 21, 2025
2cfb1a4
Update README.md
damachine Sep 21, 2025
1b2bbe9
Merge pull request #51 from damachine/damachine-patch-1
damachine Sep 21, 2025
40993b7
Revise features section in README.md
damachine Sep 21, 2025
6ece100
Merge pull request #52 from damachine/damachine-patch-1
damachine Sep 21, 2025
a7c6875
Fix formatting in README.md features section
damachine Sep 21, 2025
582c47e
Merge pull request #53 from damachine/damachine-patch-1
damachine Sep 21, 2025
29d7bc8
Fix formatting in README features section
damachine Sep 21, 2025
37591d1
Merge pull request #54 from damachine/damachine-patch-1
damachine Sep 21, 2025
98cc81e
docs: fix typo in README
damachine Sep 21, 2025
2ca00b0
bump VERSION to 1.72
damachine Sep 21, 2025
72267f2
Update feature description in README.md
damachine Sep 21, 2025
07cbf64
Merge pull request #55 from damachine/damachine-patch-1
damachine Sep 21, 2025
0261a36
bump version to 1.73
damachine Sep 22, 2025
d1b8270
Merge branch 'main' of https://github.com/damachine/coolerdash
damachine Sep 22, 2025
0b506b7
Revise contribution and help section in README (#56)
damachine Sep 22, 2025
70bd221
Enhance contribution and help section in README (#57)
damachine Sep 22, 2025
44c267d
Fix link formatting in README.md (#58)
damachine Sep 22, 2025
ccc0b11
Enhance README with contribution tips and links (#59)
damachine Sep 22, 2025
7f4af41
bump version to 1.74
damachine Sep 22, 2025
820a892
Update README.md (#60)
damachine Sep 23, 2025
3fb5f3d
Update installation steps in README.md (#61)
damachine Sep 23, 2025
157ed8b
Update README.md badges and installation instructions (#62)
damachine Sep 23, 2025
3563c9d
Revise notes and section headers in README (#63)
damachine Sep 23, 2025
6641ab8
Fix badge link for Linux platform in README (#64)
damachine Sep 23, 2025
572e9d8
Enhance README with common issues and solutions (#65)
damachine Sep 23, 2025
c2fcd48
Fix rm command syntax in README (#66)
damachine Sep 23, 2025
6da1c56
Simplify warning section in README (#67)
damachine Sep 23, 2025
f27d609
Fix formatting for CoolerDash and CoolerControl sections (#68)
damachine Sep 23, 2025
b689205
Remove warranty disclaimer from README (#69)
damachine Sep 23, 2025
660a840
Update README.md (#70)
damachine Sep 23, 2025
170afce
Update README for CoolerDash enable/start instructions
damachine Sep 24, 2025
ab93360
Update README for CoolerDash autostart instructions
damachine Sep 24, 2025
61d8cbc
Remove 'src/' from .gitignore
damachine Sep 24, 2025
da789e1
refactor: update .gitignore. exclude .cache and .makepkg in .codacy.yml
damachine Sep 24, 2025
c3a66d3
Fix formatting in AUR installation instructions (#71)
damachine Sep 24, 2025
b6b4951
Change coolerdash stop command to use .service (#73)
damachine Sep 24, 2025
b2cf095
Update devices.md (#74)
damachine Sep 24, 2025
949e131
Update tester information for Kraken 2023 (#75)
damachine Sep 24, 2025
3f025be
Add stargazers over time section to README (#77)
damachine Sep 24, 2025
6d8f6cb
bump VERSION to 1.75
damachine Sep 24, 2025
4957e8a
bump VERSION to 1.75
damachine Sep 25, 2025
0b3ade6
Update display temperature positioning and monitor header documentation
damachine Sep 25, 2025
cb47795
feat: update display temperature positioning
damachine Sep 25, 2025
2934e28
bump version to 1.76
damachine Sep 25, 2025
e284482
ci: Update release notes and changelog in AUR release job
damachine Sep 26, 2025
76debd6
ci: fix adjust release notes and changelog generation
damachine Sep 26, 2025
cf20534
ci: fix aur release changelog generation and output
damachine Sep 26, 2025
7420c80
ci: fix changelog generation and output
damachine Sep 26, 2025
acecef4
ci: add fallback for changelog generation if no previous tag exists
damachine Sep 26, 2025
ffb6f7d
bump version to 1.77
damachine Sep 26, 2025
bdcbbfe
fix(coolercontrol): match libcurl write callback signature and suppre…
damachine Sep 26, 2025
20ef8fd
chore: Added detailed function documentation for better code clarity …
damachine Sep 26, 2025
7a66396
Fix formatting in service management commands (#79)
damachine Sep 26, 2025
c336871
feat: adjust include paths after moving header files to src directory
damachine Sep 27, 2025
4e93e25
Merge remote-tracking branch 'origin/main' into patch-1
damachine Sep 27, 2025
7cbfde4
Merge pull request #80 from damachine:patch-1
damachine Sep 27, 2025
8a98df4
bump version to 1.78
damachine Sep 27, 2025
6b1792f
chore: refactor includes in coolercontrol.c
damachine Sep 27, 2025
b9a0b52
fix: coolercontrol.h - correct write_callback signature
damachine Sep 27, 2025
cf9eeba
bump version to 1.79
damachine Sep 27, 2025
fa109b1
fix: bump version to 1.79
damachine Sep 27, 2025
8e2d5ea
bump version to 1.80
damachine Sep 27, 2025
df03b87
Update CoolerDash runtime instructions in README (#81)
damachine Sep 27, 2025
5731691
Update README.md (#82)
damachine Sep 28, 2025
8a39fa5
Fix formatting in README header (#83)
damachine Sep 30, 2025
1e4112a
Revert fix header formatting (#84)
damachine Sep 30, 2025
06d0fe6
Add Codacy security scan workflow (#29)
damachine Oct 1, 2025
69f220e
Modify Codacy workflow for schedule and action version (#85)
damachine Oct 1, 2025
e635f7e
Add coolercontrol.c from cc-changes branch
damachine Oct 2, 2025
94c6afb
bump VERSION to 1.81
damachine Oct 2, 2025
721c177
Clarify contribution instructions in README
damachine Oct 5, 2025
e429e9e
bump version to 1.82
damachine Oct 6, 2025
74074d3
Add additional SSH key for user 'christkue79@gmail.com'
damachine Oct 6, 2025
9a73e80
Remove email addresses from ssh_allowed_signers
damachine Oct 6, 2025
6339826
Revise CoolerControl settings instructions
damachine Oct 8, 2025
815bbc3
Revise contribution section in README.md
damachine Oct 10, 2025
3ec3d01
Enhance README with device connection troubleshooting
damachine Oct 11, 2025
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
2 changes: 1 addition & 1 deletion .SRCINFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pkgbase = coolerdash
pkgdesc = Extends CoolerControl with a polished LCD dashboard
pkgver = 1.31
pkgver = 1.82
pkgrel = 1
url = https://github.com/damachine/coolerdash
install = coolerdash.install
Expand Down
24 changes: 24 additions & 0 deletions .codacy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
engines:
# Enable Lizard code analysis
lizard:
enabled: true

# Enable only cppcheck for C code analysis
cppcheck:
enabled: true

# Enable Semgrep for security analysis
semgrep:
enabled: true

# Exclude build and temporary directories
exclude_paths:
- "build/**"
- "bin/**"
- ".cache/**"
- ".makepkg/**"
- "pkg/**"
- "temp/**"
- "*.pkg.*"
- "coolerdash-*.pkg.*"
1 change: 0 additions & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: ['bitcoin:13WjpWQMGG5sg3vTJJnCX3cXzwf2vZddKo', 'https://dogechain.info/address/DRSY4cA8eCALn819MjWLbwaePFNti9oS3y']
51 changes: 51 additions & 0 deletions .github/ISSUE_TEMPLATE/device-confirmation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: "✅ Device Confirmation"
description: Report that Coolerdash works (or doesn’t) on your device
labels: ["device-confirmation"]
title: "[Device] Confirmation: <Manufacturer Model>"
body:
- type: markdown
attributes:
value: |
Thanks for helping improve the Coolerdash compatibility list!
Please provide the details of your device below.

- type: input
id: manufacturer
attributes:
label: Manufacturer
placeholder: "e.g. ASUS, MSI, NZXT"
validations:
required: true

- type: input
id: model
attributes:
label: Model / Device
placeholder: "e.g. ROG Strix Z490-E, Kraken X63"
validations:
required: true

- type: dropdown
id: status
attributes:
label: Status
options:
- ✅ Working
- ⚠️ Partially working
- ❌ Not working
validations:
required: true

- type: input
id: os
attributes:
label: Operating System / Distro
placeholder: "e.g. Ubuntu 24.04, Arch Linux"
validations:
required: true

- type: textarea
id: notes
attributes:
label: Additional Notes
placeholder: "Any extra details, quirks, or setup steps"
110 changes: 0 additions & 110 deletions .github/copilot-instructions.md

This file was deleted.

78 changes: 32 additions & 46 deletions .github/workflows/aur.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ on:
- 'VERSION'
branches:
- main
workflow_dispatch: # Allows manual execution

workflow_dispatch:
permissions:
contents: write

Expand All @@ -16,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -27,67 +26,48 @@ jobs:
sudo apt-get install -y gnupg2 pinentry-curses jq
export GNUPGHOME=$(mktemp -d)
chmod 700 "$GNUPGHOME"
# Configure agent to allow loopback pinentry in isolated homedir
echo "allow-loopback-pinentry" > "$GNUPGHOME/gpg-agent.conf"
echo "use-agent" > "$GNUPGHOME/gpg.conf"
echo "pinentry-program /usr/bin/pinentry-curses" >> "$GNUPGHOME/gpg-agent.conf"
# ensure gpg uses the new homedir when started later
echo "GNUPGHOME=$GNUPGHOME" >> $GITHUB_ENV

- name: Import GPG key into isolated GNUPGHOME
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
run: |
set -euo pipefail
# kill any agent that might interfere
gpgconf --kill gpg-agent || true
# import key into isolated homedir
echo "$GPG_PRIVATE_KEY" | gpg --batch --import
# Trust the imported key
echo -e "5\ny\n" | gpg --batch --command-fd 0 --expert --edit-key $(gpg --list-secret-keys --with-colons | awk -F: '/^sec/ {print $5; exit}') trust quit || true

- name: Read version and find next available tag
id: version
run: |
base_ver=$(cat VERSION | tr -d '\n\r' | xargs)

# Fetch all tags from remote
git fetch --tags origin || true

# Finde die nächste verfügbare Versionsnummer
counter=0
while true; do
if [ $counter -eq 0 ]; then
# Erste Variante: Basis-Version (z.B. v1.28)
test_version="$base_ver"
test_tag="v$test_version"
else
# Weitere Varianten: Basis-Version mit Suffix (z.B. v1.28.1, v1.28.2)
test_version="$base_ver.$counter"
test_tag="v$test_version"
fi

# Prüfen ob dieser Tag bereits existiert
if ! git tag -l "$test_tag" | grep -q "$test_tag" && ! git ls-remote --tags origin | grep -q "refs/tags/$test_tag"; then
# Tag existiert nicht, verwenden wir ihn
final_version="$test_version"
final_tag="$test_tag"
break
fi

counter=$((counter + 1))

# Sicherheit: Maximal 100 Versuche
if [ $counter -gt 100 ]; then
echo "ERROR: Could not find available version after 100 attempts"
exit 1
fi
done

echo "Base version from file: $base_ver"
echo "Final version to use: $final_version"
echo "Final tag to create: $final_tag"

echo "version=$final_version" >> $GITHUB_OUTPUT
echo "tag=$final_tag" >> $GITHUB_OUTPUT
echo "release_msg=AUR Release $final_tag" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -120,52 +100,43 @@ jobs:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
set -euo pipefail

# Sicherstellen, dass wir den aktuellen Stand haben
git fetch origin

echo "Creating signed tag: $TAG"

# GPG Agent starten falls nötig
gpg-agent --daemon --allow-preset-passphrase --max-cache-ttl 3600 || true

# Tag erstellen mit GPG-Signatur
echo "$GPG_PASSPHRASE" | gpg --batch --yes --passphrase-fd 0 --pinentry-mode loopback \
--sign --armor --detach-sign --local-user "${{ steps.gpg.outputs.keyid }}" \
--output /tmp/dummy.sig <(echo "test") || true

# Eigentlichen Tag erstellen
echo "$GPG_PASSPHRASE" | git -c "gpg.program=gpg" \
-c "user.signingkey=${{ steps.gpg.outputs.keyid }}" \
tag -s "$TAG" -m "$MSG" HEAD

# Tag zur Remote-Repository pushen
git push origin "$TAG"

echo "Successfully created and pushed signed tag: $TAG"

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844
with:
tag_name: ${{ steps.version.outputs.tag }}
name: ${{ steps.version.outputs.release_msg }}
draft: false
prerelease: false
generate_release_notes: true
body: |
## AUR Package Release ${{ steps.version.outputs.version }}
body: |
## This release contains the package files for the Arch User Repository (AUR).

This release contains the updated package files for the Arch User Repository (AUR).
### Changes
[![AUR](https://img.shields.io/aur/version/coolerdash-git?color=blue&label=AUR)](https://aur.archlinux.org/packages/coolerdash-git)

### Changes:
- Version updated to ${{ steps.version.outputs.version }}

### Installation
### Installation:
```bash
# Install from AUR
# STEP 1: Using an AUR helper and install
yay -S coolerdash-git
# or
paru -S coolerdash-git
#OR any other AUR helper

# STEP 2: Enable/Start CoolerDash sytemd service
systemctl daemon-reload
systemctl enable --now coolerdash.service
```
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -174,12 +145,27 @@ jobs:
run: |
echo "Verifying tag signature..."
git tag -v "${{ steps.version.outputs.tag }}" || echo "Tag verification completed"

echo "Release completed successfully!"
echo "Signed tag created: ${{ steps.version.outputs.tag }}"
echo "GitHub Release: https://github.com/${{ github.repository }}/releases/tag/${{ steps.version.outputs.tag }}"

# Summary report
- name: Cleanup GPG environment
if: always()
run: |
echo "Cleaning up GPG environment..."
if [ -n "$GNUPGHOME" ] && [ -d "$GNUPGHOME" ]; then
gpgconf --kill gpg-agent || true
rm -rf "$GNUPGHOME"
echo "Removed GNUPGHOME: $GNUPGHOME"
fi
for key in $(gpg --list-secret-keys --with-colons 2>/dev/null | awk -F: '/^sec/ {print $5}'); do
gpg --batch --yes --delete-secret-keys "$key" || true
done
for key in $(gpg --list-keys --with-colons 2>/dev/null | awk -F: '/^pub/ {print $5}'); do
gpg --batch --yes --delete-keys "$key" || true
done
echo "✅ GPG cleanup completed."

aur-release-summary:
name: AUR Release Summary
runs-on: ubuntu-latest
Expand Down
Loading