You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
echo "appimagetool installed to /usr/local/bin/appimagetool"
46
54
47
-
- name: Get Project Version from pyproject.toml
55
+
- name: Get Project Version
48
56
id: get_project_version
49
57
run: |
50
-
# --- Check which version key exists in pyproject.toml ---
51
-
# Assuming standard [project] table or [tool.poetry]
58
+
# Robust version reading from pyproject.toml (supports project/poetry tables and Python 3.11+ tomllib or older tomli)
52
59
VERSION_CMD=""
53
-
if python -c "import tomllib; data=tomllib.load(open('pyproject.toml', 'rb')); exit(0) if 'project' in data and 'version' in data['project'] else exit(1)"; then
elif python -c "import tomllib; data=tomllib.load(open('pyproject.toml', 'rb')); exit(0) if 'tool' in data and 'poetry' in data['tool'] and 'version' in data['tool']['poetry'] else exit(1)"; then
echo "Reading version from [tool][poetry][version]"
60
+
if python -c "import sys; sys.exit(0) if sys.version_info >= (3, 11) else sys.exit(1)"; then
61
+
# Python 3.11+ has built-in tomllib
62
+
if python -c "import tomllib; data=tomllib.load(open('pyproject.toml', 'rb')); exit(0) if 'project' in data and 'version' in data['project'] else exit(1)"; then
echo "Reading version from [project][version] using tomllib"
65
+
elif python -c "import tomllib; data=tomllib.load(open('pyproject.toml', 'rb')); exit(0) if 'tool' in data and 'poetry' in data['tool'] and 'version' in data['tool']['poetry'] else exit(1)"; then
echo "Reading version from [tool][poetry][version] using tomllib"
68
+
else
69
+
echo "ERROR: Could not find project or tool.poetry version in pyproject.toml (Python 3.11+)"
70
+
cat pyproject.toml # Print file content for debugging
71
+
exit 1
72
+
fi
59
73
else
60
-
echo "ERROR: Could not find [project][version] or [tool][poetry][version] in pyproject.toml"
61
-
exit 1
74
+
# Older Python, try tomli (install if necessary)
75
+
pip install tomli
76
+
if python -c "import tomli; data=tomli.load(open('pyproject.toml', 'rb')); exit(0) if 'project' in data and 'version' in data['project'] else exit(1)"; then
echo "Reading version from [project][version] using tomli"
79
+
elif python -c "import tomli; data=tomli.load(open('pyproject.toml', 'rb')); exit(0) if 'tool' in data and 'poetry' in data['tool'] and 'version' in data['tool']['poetry'] else exit(1)"; then
tag_name: ${{ github.ref_name }} # Use the tag that triggered workflow
102
-
name: Release ${{ github.ref_name }}
103
-
body: "Automated AppImage release for ChromaDesk ${{ github.ref_name }}"
154
+
# Add a note about the build environment to the release title
155
+
name: Release ${{ github.ref_name }} (Built on Ubuntu 22.04)
156
+
body: | # Use multi-line body for clarity
157
+
Automated AppImage release for ChromaDesk ${{ github.ref_name }}.
158
+
159
+
**Important Note:** This build was created on **Ubuntu 22.04**. It requires a newer GLIBC version (likely 2.35 or higher) and may **not** run on older Linux distributions like Ubuntu 20.04 or Debian 11.
104
160
draft: false
105
161
prerelease: false # Set to true if these are pre-releases
106
162
env:
107
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Provided by GitHub Actions
163
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Provided by GitHub Actions
0 commit comments