Skip to content

Commit cf6d83b

Browse files
committed
changelog and release
1 parent d1ed705 commit cf6d83b

File tree

2 files changed

+45
-114
lines changed

2 files changed

+45
-114
lines changed

.github/workflows/release.yml

Lines changed: 25 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -6,128 +6,43 @@ on:
66
- 'v*'
77

88
jobs:
9-
verify:
10-
runs-on: ubuntu-latest
11-
steps:
12-
- name: Checkout
13-
uses: actions/checkout@v4
14-
15-
- name: Configure CMake
16-
run: cmake -S . -B build
17-
18-
- name: Build tests
19-
run: cmake --build build
20-
21-
- name: Run tests
22-
run: ctest --test-dir build --output-on-failure
23-
24-
platformio-build:
25-
runs-on: ubuntu-latest
26-
needs: verify
27-
strategy:
28-
fail-fast: false
29-
matrix:
30-
board: [esp32dev, esp32-s3-devkitc-1, esp32-c3-devkitm-1]
31-
steps:
32-
- name: Checkout
33-
uses: actions/checkout@v4
34-
35-
- name: Set up Python
36-
uses: actions/setup-python@v5
37-
with:
38-
python-version: '3.x'
39-
40-
- name: Cache PlatformIO
41-
uses: actions/cache@v4
42-
with:
43-
path: ~/.platformio
44-
key: ${{ runner.os }}-platformio-${{ hashFiles('**/library.json') }}
45-
restore-keys: |
46-
${{ runner.os }}-platformio-
47-
48-
- name: Install PlatformIO
49-
run: pip install --upgrade platformio
50-
51-
- name: Build library examples (ESP32 Arduino)
52-
run: |
53-
set -e
54-
for d in examples/*; do
55-
if [ -d "$d" ]; then
56-
echo "Building $d on ${{ matrix.board }} via PlatformIO CI"
57-
pio ci "$d" \
58-
--board ${{ matrix.board }} \
59-
--lib="." \
60-
--project-option "build_unflags=-std=gnu++11" \
61-
--project-option "build_flags=-std=gnu++17"
62-
fi
63-
done
64-
65-
arduino-cli:
66-
runs-on: ubuntu-latest
67-
needs: verify
68-
strategy:
69-
fail-fast: false
70-
matrix:
71-
board:
72-
- fqbn: esp32:esp32:esp32
73-
name: esp32dev
74-
- fqbn: esp32:esp32:esp32s3
75-
name: esp32-s3-devkitc-1
76-
- fqbn: esp32:esp32:esp32c3
77-
name: esp32-c3-devkitm-1
78-
steps:
79-
- name: Checkout
80-
uses: actions/checkout@v4
81-
82-
- name: Set up Arduino CLI
83-
uses: arduino/setup-arduino-cli@v1
84-
85-
- name: Install ESP32 core
86-
run: |
87-
arduino-cli core update-index
88-
arduino-cli core install esp32:esp32
89-
90-
- name: Install libraries
91-
run: |
92-
arduino-cli lib update-index
93-
arduino-cli lib install "ArduinoJson" "StreamUtils"
94-
95-
- name: Add local library to sketchbook
96-
run: |
97-
set -e
98-
SKETCHBOOK_DIR="${HOME}/Arduino"
99-
mkdir -p "$SKETCHBOOK_DIR/libraries/ESPJsonDB"
100-
rsync -a --delete --exclude ".git" ./ "$SKETCHBOOK_DIR/libraries/ESPJsonDB/"
101-
102-
- name: Build examples (${{ matrix.board.name }})
103-
env:
104-
FQBN: ${{ matrix.board.fqbn }}
105-
run: |
106-
set -e
107-
for d in examples/*; do
108-
if [ -d "$d" ]; then
109-
echo "Compiling $d"
110-
arduino-cli compile --fqbn "$FQBN" "$d"
111-
fi
112-
done
113-
1149
create-release:
11510
runs-on: ubuntu-latest
116-
needs:
117-
- verify
118-
- platformio-build
119-
- arduino-cli
12011
permissions:
12112
contents: write
12213
steps:
12314
- name: Checkout
12415
uses: actions/checkout@v4
12516

17+
- name: Extract changelog entry
18+
id: changelog
19+
uses: actions/github-script@v7
20+
with:
21+
result-encoding: string
22+
script: |
23+
const tag = process.env.GITHUB_REF_NAME || '';
24+
const version = tag.startsWith('v') ? tag.slice(1) : tag;
25+
const fs = require('node:fs');
26+
const changelog = fs.readFileSync('CHANGELOG.md', 'utf8');
27+
const heading = `## [${version}]`;
28+
const start = changelog.indexOf(heading);
29+
let entry;
30+
if (start === -1) {
31+
entry = `No changelog entry found for version ${version}.`;
32+
} else {
33+
const afterHeading = start + heading.length;
34+
const nextHeader = changelog.indexOf('\n## [', afterHeading);
35+
const sliceEnd = nextHeader === -1 ? changelog.length : nextHeader;
36+
entry = changelog.slice(start, sliceEnd).trim();
37+
}
38+
return entry;
39+
12640
- name: Create GitHub Release
12741
uses: softprops/action-gh-release@v2
12842
with:
129-
generate_release_notes: true
13043
draft: false
13144
prerelease: false
45+
generate_release_notes: false
46+
body: ${{ steps.changelog.outputs.result }}
13247
env:
13348
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,29 @@
33
All notable changes to this project will be documented in this file.
44

55
## [Unreleased]
6+
7+
- No changes yet.
8+
9+
## [1.0.2] - 2025-09-22
10+
### Added
11+
- `Logger::init` now accepts no arguments, defaulting to the baked-in configuration; docs, examples, and tests highlight the zero-config path.
12+
13+
### Fixed
14+
- Ensured the background sync task keeps running by marking `_running` before we create the task and resetting it if creation fails.
15+
16+
### Maintenance
17+
- Added generated build directories to `.gitignore` and cleaned up stray CMake artefacts that landed in the repository.
18+
19+
## [1.0.1] - 2025-09-17
20+
### Changed
21+
- Removed the `esp_logger` namespace wrapper so the types and inline `logger` instance are available without `using` declarations.
22+
- Updated the README and examples to demonstrate the namespace-free API.
23+
24+
## [1.0.0] - 2025-09-17
625
### Added
726
- Configurable logger with `debug`, `info`, `warn`, and `error` helpers.
8-
- In-memory batching with configurable size, manual `sync()`, and optional periodic sync task.
27+
- In-memory batching with configurable size that drops the oldest entries when full, manual `sync()`, and an optional periodic sync task.
928
- Sync callback API to integrate custom persistence or reporting pipelines.
1029
- Console output bridged to ESP-IDF `ESP_LOGx`, gated by a configurable global log level.
1130
- Retrieval helpers for all buffered logs or the most recent entries on demand.
1231
- Examples showing basic setup and custom sync handling.
13-
14-
### Changed
15-
- The in-memory queue now retains the most recent entries by dropping the oldest when full, avoiding silent syncs with empty payloads.

0 commit comments

Comments
 (0)