|
| 1 | +name: Refresh dependency README |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - feature/8-dependency-refresh-0.5.1 |
| 7 | + |
| 8 | +permissions: |
| 9 | + contents: write |
| 10 | + |
| 11 | +jobs: |
| 12 | + refresh: |
| 13 | + if: github.actor != 'github-actions[bot]' |
| 14 | + runs-on: ubuntu-latest |
| 15 | + steps: |
| 16 | + - uses: actions/checkout@v4 |
| 17 | + with: |
| 18 | + ref: feature/8-dependency-refresh-0.5.1 |
| 19 | + - name: Refresh current-version documentation |
| 20 | + shell: python |
| 21 | + run: | |
| 22 | + from pathlib import Path |
| 23 | + path = Path('README.md') |
| 24 | + text = path.read_text() |
| 25 | + replacements = [ |
| 26 | + ('ESPNowTransportMonitor\n - - -> ESPressio ESP-Now >= 0.5.0 < 1.0.0', 'ESPNowTransportMonitor\n - - -> ESPressio ESP-Now >= 0.5.1 < 1.0.0'), |
| 27 | + ('Event-backed observation remains a separate opt-in integration in ESPressio Event 5.8.0.', 'Event-backed observation remains a separate opt-in integration in ESPressio Event 5.8.1.'), |
| 28 | + ('ESPressio Event >= 5.8.0 < 6.0.0\nESPressio Serializable >= 0.10.1 < 1.0.0', 'ESPressio Event >= 5.8.1 < 6.0.0\nESPressio Serializable >= 0.10.1 < 1.0.0'), |
| 29 | + ] |
| 30 | + for old, new in replacements: |
| 31 | + if old not in text: |
| 32 | + raise SystemExit(f'missing expected README text: {old}') |
| 33 | + text = text.replace(old, new, 1) |
| 34 | + text = text.replace('flowduino/ESPressio-Event@^5.8.0', 'flowduino/ESPressio-Event@^5.8.1') |
| 35 | + text = text.replace('flowduino/ESPressio-Serial@^0.5.0', 'flowduino/ESPressio-Serial@^0.5.1') |
| 36 | + marker = 'Historical documentation for earlier release generations remains below where useful.\n' |
| 37 | + addition = marker + '\nCurrent coordinated dependency baselines for the 0.5.1 release are Units 0.2.2, Timing 2.2.3, Threads 3.1.3, ESP-Now 0.5.1, Event 5.8.1, and Serializable 0.10.1. Command 0.3.0, Security 0.2.0, and Sockets 0.5.0 remain the current optional integration baselines.\n' |
| 38 | + if addition not in text: |
| 39 | + if marker not in text: |
| 40 | + raise SystemExit('missing historical marker') |
| 41 | + text = text.replace(marker, addition, 1) |
| 42 | + path.write_text(text) |
| 43 | + - name: Commit README |
| 44 | + run: | |
| 45 | + if git diff --quiet -- README.md; then exit 0; fi |
| 46 | + git config user.name 'github-actions[bot]' |
| 47 | + git config user.email '41898282+github-actions[bot]@users.noreply.github.com' |
| 48 | + git add -- README.md |
| 49 | + git commit -m 'docs: refresh Serial 0.5.1 dependency README (#8)' |
| 50 | + git push origin HEAD:feature/8-dependency-refresh-0.5.1 |
0 commit comments