diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9bdbaac..73bec3e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -19,11 +19,14 @@ jobs: uses: actions/setup-go@v6 with: go-version-file: go.mod + - + name: Extract release notes from CHANGELOG.md + run: scripts/changelog.sh extract "${{ github.ref_name }}" > /tmp/release-notes.md - name: Run GoReleaser uses: goreleaser/goreleaser-action@v7 with: version: latest - args: release --clean + args: release --clean --release-notes=/tmp/release-notes.md env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml index 1a54a09..e459f9e 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -25,6 +25,10 @@ checksum: name_template: 'checksums.txt' snapshot: version_template: "{{ .Tag }}-next" +# CHANGELOG.md is the source of truth for release notes: publish.yml and +# `make release` pass --release-notes with the relevant CHANGELOG.md section, +# which skips this generated changelog. It's kept as a fallback for ad-hoc +# `goreleaser release` runs made without going through the Makefile/scripts. changelog: sort: asc filters: diff --git a/CHANGELOG.md b/CHANGELOG.md index 02d2d5e..b813a77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,23 @@ -# Unreleased +# Changelog -* Fix `.mot`/`.mopt` formatting collapsing the space in a single-element array - literal whose element is a Jinja expression (e.g. `{ {{ data[...] }} }`), - which produced an ambiguous `{{{ ... }}}` triple-brace sequence. A single - disambiguating space is now preserved whenever a restored Jinja expression's - own `{{`/`}}` delimiters would otherwise merge with an adjacent Modelica - array brace. +All notable changes to this project are documented in this file. The format +is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and each +released version corresponds to a tagged +[GitHub release](https://github.com/urbanopt/modelica-fmt/releases). + +## [Unreleased] + +## [v0.3.1] - 2026-07-14 + +* Add `-format-html`: pretty-print HTML content embedded in Modelica annotation + strings, e.g. `Documentation(info="...")` and `revisions="..."`. Opt-in and + conservative: only whitespace/indentation changes (tags, attributes, entities and text are + preserved exactly), block-level elements are indented to their nesting depth while + paragraphs with inline-only content, plain `

` headings, and inline/phrasing elements + (e.g., ``, ``, ``, `
`) stay condensed on one line, whitespace-sensitive + elements (`
`, `