something-x-dev 1.7.1.dev15__tar.gz → 1.8.0.dev19__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/.github/workflows/release-dev.yml +34 -23
- something_x_dev-1.8.0.dev19/.github/workflows/release.yml +122 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/PKG-INFO +1 -1
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/nothing_app/_version.py +3 -3
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/nothing_app/window.py +0 -1
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/pyproject.toml +21 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/something_x_dev.egg-info/PKG-INFO +1 -1
- something_x_dev-1.7.1.dev15/.github/workflows/release.yml +0 -190
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/.github/CODEOWNERS +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/.github/workflows/ci.yml +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/.gitignore +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/DEVICES.md +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/LICENSE +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/PKGBUILD +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/README.md +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/ROADMAP.md +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/cliff.toml +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/data/style.css +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/docs/RELEASING.md +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/docs/docs.html +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/docs/index.html +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/flake.nix +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/main.py +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/nothing_app/__init__.py +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/nothing_app/application.py +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/nothing_app/bluetooth.py +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/nothing_app/data/__init__.py +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/nothing_app/data/com.something.x.omarchy.desktop +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/nothing_app/data/style.css +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/nothing_app/pages/__init__.py +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/nothing_app/pages/device.py +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/nothing_app/pages/home.py +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/nothing_app/profiles.py +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/nothing_app/protocol.py +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/nothing_app/splash.py +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/nothing_app/tray.py +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/requirements.txt +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/setup.cfg +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/something_x_dev.egg-info/SOURCES.txt +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/something_x_dev.egg-info/dependency_links.txt +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/something_x_dev.egg-info/entry_points.txt +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/something_x_dev.egg-info/requires.txt +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/something_x_dev.egg-info/top_level.txt +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/somethingx +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/tests/__init__.py +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/tests/conftest.py +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/tests/test_bluetooth.py +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/tests/test_crc.py +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/tests/test_profiles.py +0 -0
- {something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/tests/test_protocol.py +0 -0
{something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/.github/workflows/release-dev.yml
RENAMED
|
@@ -6,7 +6,7 @@ on:
|
|
|
6
6
|
|
|
7
7
|
permissions:
|
|
8
8
|
contents: write
|
|
9
|
-
id-token: write
|
|
9
|
+
id-token: write
|
|
10
10
|
|
|
11
11
|
jobs:
|
|
12
12
|
release-dev:
|
|
@@ -18,54 +18,69 @@ jobs:
|
|
|
18
18
|
with:
|
|
19
19
|
fetch-depth: 0
|
|
20
20
|
|
|
21
|
-
# ──
|
|
22
|
-
#
|
|
23
|
-
|
|
21
|
+
# ── Compute next version with python-semantic-release ───────────────
|
|
22
|
+
# PSR reads ALL commits since the last vX.Y.Z tag and applies the
|
|
23
|
+
# highest bump type (feat beats fix, breaking beats all).
|
|
24
|
+
# We strip PSR's own prerelease counter and use github.run_number instead.
|
|
25
|
+
- name: Compute dev version
|
|
24
26
|
id: version
|
|
25
27
|
run: |
|
|
26
|
-
pip install
|
|
27
|
-
DEV_VERSION=$(python3 -m setuptools_scm)
|
|
28
|
+
pip install python-semantic-release
|
|
28
29
|
SHORT_SHA=$(git rev-parse --short HEAD)
|
|
30
|
+
|
|
31
|
+
# --print: compute next version with no side effects
|
|
32
|
+
# On develop (prerelease=true in pyproject.toml) PSR outputs e.g. "1.8.0.dev1"
|
|
33
|
+
NEXT_PRE=$(semantic-release version --print 2>/dev/null || echo "")
|
|
34
|
+
|
|
35
|
+
if [ -n "$NEXT_PRE" ]; then
|
|
36
|
+
# Strip PSR's counter (.dev1 / -dev.1) — we use run_number instead
|
|
37
|
+
NEXT_BASE=$(echo "$NEXT_PRE" | sed -E 's/[.-]dev[.-]?[0-9]*//')
|
|
38
|
+
DEV_VERSION="${NEXT_BASE}.dev${{ github.run_number }}"
|
|
39
|
+
else
|
|
40
|
+
# No user-facing commits — still build, bump patch as fallback
|
|
41
|
+
LAST=$(git describe --tags --abbrev=0 --match "v[0-9]*.[0-9]*.[0-9]*" 2>/dev/null | sed 's/^v//' || echo "0.0.0")
|
|
42
|
+
MAJOR=$(echo $LAST | cut -d. -f1)
|
|
43
|
+
MINOR=$(echo $LAST | cut -d. -f2)
|
|
44
|
+
PATCH=$(echo $LAST | cut -d. -f3)
|
|
45
|
+
DEV_VERSION="${MAJOR}.${MINOR}.$((PATCH+1)).dev${{ github.run_number }}"
|
|
46
|
+
fi
|
|
47
|
+
|
|
48
|
+
echo "Dev version: $DEV_VERSION (sha: $SHORT_SHA)"
|
|
29
49
|
echo "dev_version=$DEV_VERSION" >> $GITHUB_OUTPUT
|
|
30
50
|
echo "short_sha=$SHORT_SHA" >> $GITHUB_OUTPUT
|
|
31
|
-
echo "Dev version: $DEV_VERSION (sha: $SHORT_SHA)"
|
|
32
51
|
|
|
33
52
|
# ── Patch package name for dev channel ─────────────────────────────
|
|
34
53
|
- name: Patch package name
|
|
35
54
|
run: |
|
|
36
55
|
sed -i 's/^name\s*=\s*"something-x"/name = "something-x-dev"/' pyproject.toml
|
|
37
56
|
sed -i 's/^something-x = /something-x-dev = /' pyproject.toml
|
|
38
|
-
grep -E "^name|something-x" pyproject.toml
|
|
39
57
|
|
|
40
|
-
# ── Build
|
|
58
|
+
# ── Build ───────────────────────────────────────────────────────────
|
|
41
59
|
- name: Set up Python
|
|
42
60
|
uses: actions/setup-python@v5
|
|
43
61
|
with:
|
|
44
62
|
python-version: "3.11"
|
|
45
63
|
|
|
46
64
|
- name: Build distribution
|
|
65
|
+
env:
|
|
66
|
+
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ steps.version.outputs.dev_version }}
|
|
47
67
|
run: |
|
|
48
68
|
pip install build
|
|
49
69
|
python -m build
|
|
50
70
|
ls dist/
|
|
51
71
|
|
|
52
|
-
# ──
|
|
53
|
-
- name: Install git-cliff
|
|
54
|
-
run: pip install git-cliff
|
|
55
|
-
|
|
72
|
+
# ── Release notes ───────────────────────────────────────────────────
|
|
56
73
|
- name: Generate pre-release notes
|
|
57
74
|
run: |
|
|
75
|
+
pip install git-cliff
|
|
58
76
|
git cliff --unreleased --strip all 2>/dev/null > /tmp/cliff_body.md
|
|
59
|
-
|
|
60
|
-
echo "No user-facing changes since last release." > /tmp/cliff_body.md
|
|
61
|
-
fi
|
|
77
|
+
[ -s /tmp/cliff_body.md ] || echo "No user-facing changes since last release." > /tmp/cliff_body.md
|
|
62
78
|
|
|
63
79
|
cat > /tmp/release_notes.md <<HEADER
|
|
64
80
|
## something-x-dev ${{ steps.version.outputs.dev_version }}
|
|
65
81
|
|
|
66
82
|
> Pre-release build from \`develop\` — not for production use.
|
|
67
|
-
|
|
68
|
-
**Commit**: \`${{ steps.version.outputs.short_sha }}\`
|
|
83
|
+
> **Commit**: \`${{ steps.version.outputs.short_sha }}\`
|
|
69
84
|
|
|
70
85
|
### Changes since last stable release
|
|
71
86
|
|
|
@@ -74,12 +89,8 @@ jobs:
|
|
|
74
89
|
cat >> /tmp/release_notes.md <<'FOOTER'
|
|
75
90
|
|
|
76
91
|
### Install
|
|
77
|
-
|
|
78
92
|
```bash
|
|
79
93
|
pip install something-x-dev==${{ steps.version.outputs.dev_version }}
|
|
80
|
-
|
|
81
|
-
# Or download the wheel below
|
|
82
|
-
pip install something_x_dev-${{ steps.version.outputs.dev_version }}-py3-none-any.whl
|
|
83
94
|
```
|
|
84
95
|
FOOTER
|
|
85
96
|
|
|
@@ -92,6 +103,6 @@ jobs:
|
|
|
92
103
|
body_path: /tmp/release_notes.md
|
|
93
104
|
files: dist/*
|
|
94
105
|
|
|
95
|
-
# ── Publish to PyPI
|
|
106
|
+
# ── Publish to PyPI ─────────────────────────────────────────────────
|
|
96
107
|
- name: Publish to PyPI
|
|
97
108
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: write
|
|
9
|
+
id-token: write
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
release:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
with:
|
|
19
|
+
fetch-depth: 0
|
|
20
|
+
token: ${{ secrets.RELEASE_PAT }}
|
|
21
|
+
|
|
22
|
+
# ── Compute stable version with python-semantic-release ─────────────
|
|
23
|
+
# PSR reads ALL commits since last vX.Y.Z tag, highest bump wins.
|
|
24
|
+
# docs/chore/ci/test commits produce no output → release skipped.
|
|
25
|
+
- name: Compute release version
|
|
26
|
+
id: version
|
|
27
|
+
run: |
|
|
28
|
+
pip install python-semantic-release
|
|
29
|
+
NEW=$(semantic-release version --print 2>/dev/null || echo "")
|
|
30
|
+
if [ -z "$NEW" ]; then
|
|
31
|
+
echo "No releasable commits (docs/chore/style/ci/test only). Skipping."
|
|
32
|
+
echo "skip=true" >> $GITHUB_OUTPUT
|
|
33
|
+
exit 0
|
|
34
|
+
fi
|
|
35
|
+
echo "New version: $NEW"
|
|
36
|
+
echo "new=$NEW" >> $GITHUB_OUTPUT
|
|
37
|
+
echo "skip=false" >> $GITHUB_OUTPUT
|
|
38
|
+
|
|
39
|
+
# ── Tag and push ────────────────────────────────────────────────────
|
|
40
|
+
- name: Create and push release tag
|
|
41
|
+
if: steps.version.outputs.skip != 'true'
|
|
42
|
+
run: |
|
|
43
|
+
git config user.name "github-actions[bot]"
|
|
44
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
45
|
+
git tag "v${{ steps.version.outputs.new }}"
|
|
46
|
+
git push origin "v${{ steps.version.outputs.new }}"
|
|
47
|
+
|
|
48
|
+
# ── Build ───────────────────────────────────────────────────────────
|
|
49
|
+
- name: Set up Python
|
|
50
|
+
if: steps.version.outputs.skip != 'true'
|
|
51
|
+
uses: actions/setup-python@v5
|
|
52
|
+
with:
|
|
53
|
+
python-version: "3.11"
|
|
54
|
+
|
|
55
|
+
- name: Build distribution
|
|
56
|
+
if: steps.version.outputs.skip != 'true'
|
|
57
|
+
env:
|
|
58
|
+
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ steps.version.outputs.new }}
|
|
59
|
+
run: |
|
|
60
|
+
pip install build
|
|
61
|
+
python -m build
|
|
62
|
+
ls dist/
|
|
63
|
+
|
|
64
|
+
# ── Release notes ───────────────────────────────────────────────────
|
|
65
|
+
- name: Generate release notes
|
|
66
|
+
if: steps.version.outputs.skip != 'true'
|
|
67
|
+
run: |
|
|
68
|
+
pip install git-cliff
|
|
69
|
+
git cliff --latest --strip all 2>/dev/null > /tmp/cliff_body.md
|
|
70
|
+
[ -s /tmp/cliff_body.md ] || echo "No user-facing changes in this release." > /tmp/cliff_body.md
|
|
71
|
+
|
|
72
|
+
cat > /tmp/release_notes.md <<HEADER
|
|
73
|
+
## Something X v${{ steps.version.outputs.new }}
|
|
74
|
+
|
|
75
|
+
HEADER
|
|
76
|
+
cat /tmp/cliff_body.md >> /tmp/release_notes.md
|
|
77
|
+
cat >> /tmp/release_notes.md <<'FOOTER'
|
|
78
|
+
|
|
79
|
+
### Install
|
|
80
|
+
```bash
|
|
81
|
+
# Arch / Omarchy
|
|
82
|
+
sudo pacman -S python-gobject python-cairo gtk4 libadwaita
|
|
83
|
+
pip install something-x==${{ steps.version.outputs.new }}
|
|
84
|
+
```
|
|
85
|
+
FOOTER
|
|
86
|
+
|
|
87
|
+
# ── GitHub Release ──────────────────────────────────────────────────
|
|
88
|
+
- name: Create GitHub Release
|
|
89
|
+
if: steps.version.outputs.skip != 'true'
|
|
90
|
+
uses: softprops/action-gh-release@v2
|
|
91
|
+
with:
|
|
92
|
+
tag_name: "v${{ steps.version.outputs.new }}"
|
|
93
|
+
body_path: /tmp/release_notes.md
|
|
94
|
+
files: dist/*
|
|
95
|
+
|
|
96
|
+
# ── Publish to PyPI ─────────────────────────────────────────────────
|
|
97
|
+
- name: Publish to PyPI
|
|
98
|
+
if: steps.version.outputs.skip != 'true'
|
|
99
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
100
|
+
|
|
101
|
+
# ── Update AUR ──────────────────────────────────────────────────────
|
|
102
|
+
- name: Update PKGBUILD
|
|
103
|
+
if: steps.version.outputs.skip != 'true'
|
|
104
|
+
env:
|
|
105
|
+
NEW_VERSION: ${{ steps.version.outputs.new }}
|
|
106
|
+
run: |
|
|
107
|
+
SHA256=$(sha256sum dist/something_x-${NEW_VERSION}.tar.gz | awk '{print $1}')
|
|
108
|
+
sed -i "s/^pkgver=.*/pkgver=${NEW_VERSION}/" PKGBUILD
|
|
109
|
+
sed -i "s/^pkgrel=.*/pkgrel=1/" PKGBUILD
|
|
110
|
+
sed -i "s/sha256sums=('[^']*')/sha256sums=('${SHA256}')/" PKGBUILD
|
|
111
|
+
|
|
112
|
+
- name: Deploy to AUR
|
|
113
|
+
if: steps.version.outputs.skip != 'true'
|
|
114
|
+
uses: KSXGitHub/github-actions-deploy-aur@v3.0.1
|
|
115
|
+
with:
|
|
116
|
+
pkgname: something-x
|
|
117
|
+
pkgbuild: ./PKGBUILD
|
|
118
|
+
commit_username: github-actions[bot]
|
|
119
|
+
commit_email: github-actions[bot]@users.noreply.github.com
|
|
120
|
+
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
|
|
121
|
+
commit_message: "Update to ${{ steps.version.outputs.new }}"
|
|
122
|
+
allow_empty_commits: false
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '1.
|
|
22
|
-
__version_tuple__ = version_tuple = (1,
|
|
21
|
+
__version__ = version = '1.8.0.dev19'
|
|
22
|
+
__version_tuple__ = version_tuple = (1, 8, 0, 'dev19')
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id =
|
|
24
|
+
__commit_id__ = commit_id = None
|
|
@@ -34,7 +34,6 @@ class SomethingXWindow(Adw.ApplicationWindow):
|
|
|
34
34
|
nd = NothingDevice(address)
|
|
35
35
|
self._nothing_devices[path] = nd
|
|
36
36
|
nd.connect_rfcomm()
|
|
37
|
-
print(f"[window] autoconnect RFCOMM → {address}")
|
|
38
37
|
|
|
39
38
|
def _on_bt_connected(self, _mgr, path: str):
|
|
40
39
|
dev = self._bt.devices.get(path)
|
|
@@ -53,6 +53,27 @@ version_scheme = "guess-next-dev"
|
|
|
53
53
|
local_scheme = "no-local-version"
|
|
54
54
|
version_file = "nothing_app/_version.py"
|
|
55
55
|
|
|
56
|
+
[tool.semantic_release]
|
|
57
|
+
# Version is tag-only — PSR reads from the last vX.Y.Z tag and writes a new tag.
|
|
58
|
+
# No version_toml / version_variables → no file modifications.
|
|
59
|
+
tag_format = "v{version}"
|
|
60
|
+
commit_version_number = false
|
|
61
|
+
commit_message = ""
|
|
62
|
+
|
|
63
|
+
[tool.semantic_release.branches.main]
|
|
64
|
+
match = "main"
|
|
65
|
+
prerelease = false
|
|
66
|
+
|
|
67
|
+
[tool.semantic_release.branches.develop]
|
|
68
|
+
match = "develop"
|
|
69
|
+
prerelease = true
|
|
70
|
+
prerelease_token = "dev"
|
|
71
|
+
|
|
72
|
+
[tool.semantic_release.commit_parser_options]
|
|
73
|
+
major_tags = ["BREAKING CHANGE"]
|
|
74
|
+
minor_tags = ["feat"]
|
|
75
|
+
patch_tags = ["fix", "perf", "refactor"]
|
|
76
|
+
|
|
56
77
|
[tool.ruff]
|
|
57
78
|
line-length = 110
|
|
58
79
|
|
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
name: Release
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [main]
|
|
6
|
-
|
|
7
|
-
permissions:
|
|
8
|
-
contents: write
|
|
9
|
-
id-token: write # for PyPI OIDC trusted publishing
|
|
10
|
-
|
|
11
|
-
jobs:
|
|
12
|
-
release:
|
|
13
|
-
runs-on: ubuntu-latest
|
|
14
|
-
if: "!contains(github.event.head_commit.message, '[skip ci]')"
|
|
15
|
-
|
|
16
|
-
steps:
|
|
17
|
-
- uses: actions/checkout@v4
|
|
18
|
-
with:
|
|
19
|
-
fetch-depth: 0
|
|
20
|
-
token: ${{ secrets.RELEASE_PAT }}
|
|
21
|
-
|
|
22
|
-
# ── Determine version bump from conventional commit ─────────────────
|
|
23
|
-
- name: Parse commit and bump version
|
|
24
|
-
id: version
|
|
25
|
-
run: |
|
|
26
|
-
COMMIT_MSG=$(git log -1 --pretty=%B)
|
|
27
|
-
echo "Commit: $COMMIT_MSG"
|
|
28
|
-
|
|
29
|
-
# Read current version from last vX.Y.Z tag (not pyproject.toml)
|
|
30
|
-
CURRENT=$(git describe --tags --abbrev=0 --match "v[0-9]*.[0-9]*.[0-9]*" 2>/dev/null | sed 's/^v//')
|
|
31
|
-
if [ -z "$CURRENT" ]; then
|
|
32
|
-
CURRENT="0.0.0"
|
|
33
|
-
fi
|
|
34
|
-
echo "Current version (last tag): $CURRENT"
|
|
35
|
-
|
|
36
|
-
MAJOR=$(echo $CURRENT | cut -d. -f1)
|
|
37
|
-
MINOR=$(echo $CURRENT | cut -d. -f2)
|
|
38
|
-
PATCH=$(echo $CURRENT | cut -d. -f3)
|
|
39
|
-
|
|
40
|
-
if echo "$COMMIT_MSG" | grep -qE "(^(feat|fix|refactor|perf)!:)|(BREAKING CHANGE:)"; then
|
|
41
|
-
BUMP=major
|
|
42
|
-
MAJOR=$((MAJOR + 1)); MINOR=0; PATCH=0
|
|
43
|
-
elif echo "$COMMIT_MSG" | grep -qE "^feat(\([^)]+\))?:"; then
|
|
44
|
-
BUMP=minor
|
|
45
|
-
MINOR=$((MINOR + 1)); PATCH=0
|
|
46
|
-
elif echo "$COMMIT_MSG" | grep -qE "^(fix|perf|refactor)(\([^)]+\))?:"; then
|
|
47
|
-
BUMP=patch
|
|
48
|
-
PATCH=$((PATCH + 1))
|
|
49
|
-
else
|
|
50
|
-
echo "Commit type does not trigger a release (docs/chore/style/ci/test). Skipping."
|
|
51
|
-
echo "skip=true" >> $GITHUB_OUTPUT
|
|
52
|
-
exit 0
|
|
53
|
-
fi
|
|
54
|
-
|
|
55
|
-
NEW="$MAJOR.$MINOR.$PATCH"
|
|
56
|
-
echo "Bump: $BUMP → $CURRENT → $NEW"
|
|
57
|
-
echo "current=$CURRENT" >> $GITHUB_OUTPUT
|
|
58
|
-
echo "new=$NEW" >> $GITHUB_OUTPUT
|
|
59
|
-
echo "bump=$BUMP" >> $GITHUB_OUTPUT
|
|
60
|
-
echo "skip=false" >> $GITHUB_OUTPUT
|
|
61
|
-
|
|
62
|
-
# ── Tag and push (no pyproject.toml commit needed) ──────────────────
|
|
63
|
-
- name: Create and push release tag
|
|
64
|
-
if: steps.version.outputs.skip != 'true'
|
|
65
|
-
run: |
|
|
66
|
-
git config user.name "github-actions[bot]"
|
|
67
|
-
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
68
|
-
git tag "v${{ steps.version.outputs.new }}"
|
|
69
|
-
git push origin "v${{ steps.version.outputs.new }}"
|
|
70
|
-
|
|
71
|
-
# ── Generate changelog with git-cliff ──────────────────────────────
|
|
72
|
-
- name: Install git-cliff
|
|
73
|
-
if: steps.version.outputs.skip != 'true'
|
|
74
|
-
run: pip install git-cliff
|
|
75
|
-
|
|
76
|
-
- name: Generate release notes
|
|
77
|
-
if: steps.version.outputs.skip != 'true'
|
|
78
|
-
run: |
|
|
79
|
-
# --latest: commits from the previous vX.Y.Z tag up to the tag we just pushed
|
|
80
|
-
# cliff.toml: skips merge commits, ignores dev-* tags, filters to conventional commits
|
|
81
|
-
git cliff --latest --strip all 2>/dev/null > /tmp/cliff_body.md
|
|
82
|
-
if [ ! -s /tmp/cliff_body.md ]; then
|
|
83
|
-
echo "No user-facing changes in this release." > /tmp/cliff_body.md
|
|
84
|
-
fi
|
|
85
|
-
|
|
86
|
-
# Prepend the header + install block; cliff body goes in the middle
|
|
87
|
-
cat > /tmp/release_notes.md <<HEADER
|
|
88
|
-
## Something X v${{ steps.version.outputs.new }}
|
|
89
|
-
|
|
90
|
-
HEADER
|
|
91
|
-
cat /tmp/cliff_body.md >> /tmp/release_notes.md
|
|
92
|
-
cat >> /tmp/release_notes.md <<'FOOTER'
|
|
93
|
-
|
|
94
|
-
### Install
|
|
95
|
-
|
|
96
|
-
```bash
|
|
97
|
-
# Arch / Omarchy (recommended)
|
|
98
|
-
sudo pacman -S python-gobject python-dbus python-cairo gtk4 libadwaita
|
|
99
|
-
pip install something-x==${{ steps.version.outputs.new }}
|
|
100
|
-
|
|
101
|
-
# Or download the wheel below
|
|
102
|
-
pip install something_x-${{ steps.version.outputs.new }}-py3-none-any.whl
|
|
103
|
-
```
|
|
104
|
-
FOOTER
|
|
105
|
-
|
|
106
|
-
echo "--- Release notes preview ---"
|
|
107
|
-
cat /tmp/release_notes.md
|
|
108
|
-
|
|
109
|
-
# ── Build wheel + sdist ─────────────────────────────────────────────
|
|
110
|
-
- name: Set up Python
|
|
111
|
-
if: steps.version.outputs.skip != 'true'
|
|
112
|
-
uses: actions/setup-python@v5
|
|
113
|
-
with:
|
|
114
|
-
python-version: "3.11"
|
|
115
|
-
|
|
116
|
-
- name: Build distribution
|
|
117
|
-
if: steps.version.outputs.skip != 'true'
|
|
118
|
-
run: |
|
|
119
|
-
pip install build
|
|
120
|
-
python -m build
|
|
121
|
-
ls dist/
|
|
122
|
-
|
|
123
|
-
# ── Generate changelog with git-cliff ──────────────────────────────
|
|
124
|
-
- name: Install git-cliff
|
|
125
|
-
if: steps.version.outputs.skip != 'true'
|
|
126
|
-
run: pip install git-cliff
|
|
127
|
-
|
|
128
|
-
- name: Generate release notes
|
|
129
|
-
if: steps.version.outputs.skip != 'true'
|
|
130
|
-
run: |
|
|
131
|
-
git cliff --latest --strip all 2>/dev/null > /tmp/cliff_body.md
|
|
132
|
-
if [ ! -s /tmp/cliff_body.md ]; then
|
|
133
|
-
echo "No user-facing changes in this release." > /tmp/cliff_body.md
|
|
134
|
-
fi
|
|
135
|
-
|
|
136
|
-
cat > /tmp/release_notes.md <<HEADER
|
|
137
|
-
## Something X v${{ steps.version.outputs.new }}
|
|
138
|
-
|
|
139
|
-
HEADER
|
|
140
|
-
cat /tmp/cliff_body.md >> /tmp/release_notes.md
|
|
141
|
-
cat >> /tmp/release_notes.md <<'FOOTER'
|
|
142
|
-
|
|
143
|
-
### Install
|
|
144
|
-
|
|
145
|
-
```bash
|
|
146
|
-
# Arch / Omarchy (recommended)
|
|
147
|
-
sudo pacman -S python-gobject python-cairo gtk4 libadwaita
|
|
148
|
-
pip install something-x==${{ steps.version.outputs.new }}
|
|
149
|
-
|
|
150
|
-
# Or download the wheel below
|
|
151
|
-
pip install something_x-${{ steps.version.outputs.new }}-py3-none-any.whl
|
|
152
|
-
```
|
|
153
|
-
FOOTER
|
|
154
|
-
|
|
155
|
-
# ── GitHub Release ──────────────────────────────────────────────────
|
|
156
|
-
- name: Create GitHub Release
|
|
157
|
-
if: steps.version.outputs.skip != 'true'
|
|
158
|
-
uses: softprops/action-gh-release@v2
|
|
159
|
-
with:
|
|
160
|
-
tag_name: "v${{ steps.version.outputs.new }}"
|
|
161
|
-
body_path: /tmp/release_notes.md
|
|
162
|
-
files: dist/*
|
|
163
|
-
|
|
164
|
-
# ── Publish to PyPI (OIDC trusted publisher) ────────────────────────
|
|
165
|
-
- name: Publish to PyPI
|
|
166
|
-
if: steps.version.outputs.skip != 'true'
|
|
167
|
-
uses: pypa/gh-action-pypi-publish@release/v1
|
|
168
|
-
|
|
169
|
-
# ── Update AUR package ──────────────────────────────────────────────
|
|
170
|
-
- name: Update PKGBUILD and push to AUR
|
|
171
|
-
if: steps.version.outputs.skip != 'true'
|
|
172
|
-
env:
|
|
173
|
-
NEW_VERSION: ${{ steps.version.outputs.new }}
|
|
174
|
-
run: |
|
|
175
|
-
SHA256=$(sha256sum dist/something_x-${NEW_VERSION}.tar.gz | awk '{print $1}')
|
|
176
|
-
sed -i "s/^pkgver=.*/pkgver=${NEW_VERSION}/" PKGBUILD
|
|
177
|
-
sed -i "s/^pkgrel=.*/pkgrel=1/" PKGBUILD
|
|
178
|
-
sed -i "s/sha256sums=('[^']*')/sha256sums=('${SHA256}')/" PKGBUILD
|
|
179
|
-
|
|
180
|
-
- name: Deploy to AUR
|
|
181
|
-
if: steps.version.outputs.skip != 'true'
|
|
182
|
-
uses: KSXGitHub/github-actions-deploy-aur@v3.0.1
|
|
183
|
-
with:
|
|
184
|
-
pkgname: something-x
|
|
185
|
-
pkgbuild: ./PKGBUILD
|
|
186
|
-
commit_username: github-actions[bot]
|
|
187
|
-
commit_email: github-actions[bot]@users.noreply.github.com
|
|
188
|
-
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
|
|
189
|
-
commit_message: "Update to ${{ steps.version.outputs.new }}"
|
|
190
|
-
allow_empty_commits: false
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/something_x_dev.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/something_x_dev.egg-info/requires.txt
RENAMED
|
File without changes
|
{something_x_dev-1.7.1.dev15 → something_x_dev-1.8.0.dev19}/something_x_dev.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|