From 2eda3d47ae04992e9abcc8c37c2d445a57f3c5de Mon Sep 17 00:00:00 2001 From: 2GT-Rich <107219997+2GT-Rich@users.noreply.github.com> Date: Thu, 3 Sep 2026 08:58:25 -0700 Subject: [PATCH] ci: cut a release when the version changes (v0.23.30-beta) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .github/workflows/release.yml | 64 +++++++++++++++++++++++++++++++++++ README.md | 2 +- backend/package.json | 2 +- frontend/package.json | 2 +- frontend/src/version.ts | 2 +- 5 files changed, 68 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..5d9312e --- /dev/null +++ b/.github/workflows/release.yml @@ -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<> "$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 diff --git a/README.md b/README.md index a74e4bc..f2a350c 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@

- Version + Version License Docker TypeScript diff --git a/backend/package.json b/backend/package.json index b8f1ce8..88e5743 100644 --- a/backend/package.json +++ b/backend/package.json @@ -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": { diff --git a/frontend/package.json b/frontend/package.json index 6c1a95a..4923cb0 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "mikrotik-manager-frontend", - "version": "0.23.29-beta", + "version": "0.23.30-beta", "private": true, "type": "module", "scripts": { diff --git a/frontend/src/version.ts b/frontend/src/version.ts index 61f3f4d..79b02a7 100644 --- a/frontend/src/version.ts +++ b/frontend/src/version.ts @@ -1 +1 @@ -export const APP_VERSION = 'v0.23.29 Beta'; +export const APP_VERSION = 'v0.23.30 Beta';