ci: cut a release when the version changes (v0.23.30-beta)

The dashboard sends people to the releases page to see what changed. That page
held a single entry from five months earlier while the product shipped several
times a day, which tells a visitor the project is abandoned — raised on #119,
and the more useful half of that thread.

A release is now cut whenever the shipped version changes, tagged to match the
container image so the thing you are running and the notes you are reading carry
the same number. Notes are the commit body rather than a generated list of
subjects, because the commit messages here already explain what changed and why.
Betas are marked pre-release so nobody is pointed at one by accident.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2GT-Rich
2026-09-03 08:58:25 -07:00
co-authored by Claude Opus 5
parent 324ceba676
commit 2eda3d47ae
5 changed files with 68 additions and 4 deletions
+64
View File
@@ -0,0 +1,64 @@
# Cut a GitHub Release whenever the shipped version changes.
#
# The dashboard links users to the releases page, and that page held a single
# entry from five months earlier while the product shipped daily — which tells a
# visitor the project is abandoned. Commit messages here already read as release
# notes, so the note is the commit body rather than a generated list of subjects.
name: Release
on:
push:
branches: [main]
paths:
- 'frontend/package.json'
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 2
- name: Read version, and stop if it did not change
id: v
run: |
VERSION=$(node -p "require('./frontend/package.json').version")
PREV=$(git show HEAD~1:frontend/package.json 2>/dev/null | node -p "JSON.parse(require('fs').readFileSync(0,'utf8')).version" || echo "")
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
if [ "$VERSION" = "$PREV" ]; then
echo "unchanged=true" >> "$GITHUB_OUTPUT"
echo "Version unchanged ($VERSION) — nothing to release."
fi
- name: Compose notes from the commit that shipped it
if: steps.v.outputs.unchanged != 'true'
id: notes
run: |
{
echo 'body<<RELEASE_EOF'
git log -1 --pretty=%B
echo ''
echo '---'
echo "Container image: \`ghcr.io/2gt-media-group-llc/mikrotik-manager:${{ steps.v.outputs.version }}\`"
echo ''
echo 'Documentation: https://2gt-media-group-llc.github.io/mikrotik-manager/'
echo 'RELEASE_EOF'
} >> "$GITHUB_OUTPUT"
- name: Publish
if: steps.v.outputs.unchanged != 'true'
env:
GH_TOKEN: ${{ github.token }}
run: |
TAG="v${{ steps.v.outputs.version }}"
# Betas are marked pre-release so nobody is pointed at one by accident.
PRERELEASE=""
case "$TAG" in *beta*|*alpha*|*rc*) PRERELEASE="--prerelease" ;; esac
gh release create "$TAG" \
--title "$TAG" \
--notes "${{ steps.notes.outputs.body }}" \
$PRERELEASE
+1 -1
View File
@@ -6,7 +6,7 @@
</p>
<p align="center">
<img src="https://img.shields.io/badge/version-0.23.29_Beta-blue" alt="Version" />
<img src="https://img.shields.io/badge/version-0.23.30_Beta-blue" alt="Version" />
<img src="https://img.shields.io/badge/license-AGPLv3-blue" alt="License" />
<img src="https://img.shields.io/badge/docker-compose-2496ED?logo=docker&logoColor=white" alt="Docker" />
<img src="https://img.shields.io/badge/TypeScript-5.3-3178C6?logo=typescript&logoColor=white" alt="TypeScript" />
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "mikrotik-manager-backend",
"version": "0.23.29-beta",
"version": "0.23.30-beta",
"description": "Mikrotik Network Management Platform - Backend API",
"main": "dist/index.js",
"scripts": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "mikrotik-manager-frontend",
"version": "0.23.29-beta",
"version": "0.23.30-beta",
"private": true,
"type": "module",
"scripts": {
+1 -1
View File
@@ -1 +1 @@
export const APP_VERSION = 'v0.23.29 Beta';
export const APP_VERSION = 'v0.23.30 Beta';