|
35 | 35 | steps: |
36 | 36 | - uses: actions/checkout@v4 |
37 | 37 |
|
| 38 | + - name: Extract release notes for this tag |
| 39 | + # The single source of truth for "what changed" is CHANGELOG.md. We pull |
| 40 | + # out the section whose heading matches the tag and hand it to |
| 41 | + # tauri-action as the release body — which is also what tauri-action |
| 42 | + # writes into latest.json's `notes`, i.e. what the in-app updater shows. |
| 43 | + # Runs on every matrix platform (bash is available on all three runners) |
| 44 | + # so each job produces an identical body and latest.json stays consistent. |
| 45 | + id: notes |
| 46 | + shell: bash |
| 47 | + run: | |
| 48 | + ver="${GITHUB_REF_NAME}" |
| 49 | + # Print the lines under `## <tag>` up to the next `## ` heading, with |
| 50 | + # leading and trailing blank lines trimmed but internal ones kept. |
| 51 | + # Done inside awk so it needs nothing beyond POSIX (no tac/GNU sed) — |
| 52 | + # this step also runs on the macOS and Windows runners. |
| 53 | + body="$(awk -v head="## $ver" ' |
| 54 | + $0 == head { grab=1; next } |
| 55 | + grab && /^## / { exit } |
| 56 | + grab { |
| 57 | + if ($0 ~ /[^[:space:]]/) { while (pending-- > 0) print ""; pending=0; print; started=1 } |
| 58 | + else if (started) { pending++ } |
| 59 | + } |
| 60 | + ' CHANGELOG.md)" |
| 61 | + if [ -z "$body" ]; then |
| 62 | + echo "::warning::no CHANGELOG.md section for $ver — using a fallback line" |
| 63 | + body="See the release page for what's new in ${ver}." |
| 64 | + fi |
| 65 | + { |
| 66 | + echo "body<<__NOTES_EOF__" |
| 67 | + echo "$body" |
| 68 | + echo "__NOTES_EOF__" |
| 69 | + } >> "$GITHUB_OUTPUT" |
| 70 | +
|
38 | 71 | - name: Install Linux system dependencies |
39 | 72 | if: matrix.platform == 'ubuntu-22.04' |
40 | 73 | run: | |
@@ -93,26 +126,13 @@ jobs: |
93 | 126 | with: |
94 | 127 | tagName: ${{ github.ref_name }} |
95 | 128 | releaseName: "Field Notes ${{ github.ref_name }}" |
96 | | - releaseBody: | |
97 | | - Download an installer for your platform below. |
98 | | -
|
99 | | - **macOS:** not yet notarized — on first launch, **right-click the app and |
100 | | - choose Open** to get past Gatekeeper. |
101 | | -
|
102 | | - If you still have a problem opening it, use the **"Open Anyway"** setting: |
103 | | - 1. Try to open the app and dismiss the warning dialog. |
104 | | - 2. Open the **Apple menu** and select **System Settings**. |
105 | | - 3. Click **Privacy & Security** in the left sidebar. |
106 | | - 4. Scroll to the **Security** section — you'll see a message that the app was blocked. |
107 | | - 5. Click **Open Anyway**, enter your Mac's login password, and click **OK**. |
108 | | -
|
109 | | - **Windows:** download the `-setup.exe` installer. It isn't code-signed yet, so |
110 | | - SmartScreen may warn on first launch — click **More info → Run anyway**. |
111 | | -
|
112 | | - **Linux:** use the .AppImage (portable), or the .deb / .rpm for your distro. |
113 | | -
|
114 | | - The Companion and text-import features run a model locally — the app guides |
115 | | - you through installing Ollama and downloading one on first use. |
| 129 | + # The changelog section for this tag, from the step above. This is the |
| 130 | + # release body AND `latest.json`'s `notes`, so the in-app updater prompt |
| 131 | + # now shows what actually changed. Download links and Gatekeeper / |
| 132 | + # SmartScreen help are deliberately NOT here — they'd be noise in the |
| 133 | + # app; they're added to the GitHub release page after publishing |
| 134 | + # (see RELEASING.md). |
| 135 | + releaseBody: ${{ steps.notes.outputs.body }} |
116 | 136 | releaseDraft: true |
117 | 137 | # The updater reads /releases/latest/download/latest.json, and GitHub's |
118 | 138 | # "latest" excludes prereleases. So marking a v*-beta / v*-rc tag as a |
|
0 commit comments