Skip to content

Commit 62a778d

Browse files
author
linyuan.yang
committed
release note
1 parent cfa3916 commit 62a778d

5 files changed

Lines changed: 46 additions & 4 deletions

File tree

.github/workflows/release-app.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,23 @@ jobs:
6464
6565
- run: pnpm install --frozen-lockfile
6666

67+
- name: Extract release notes
68+
id: notes
69+
shell: bash
70+
run: |
71+
VERSION="${GITHUB_REF_NAME#app-v}"
72+
BODY=$(awk -v v="$VERSION" '
73+
$1 == "##" && $2 == v { capture=1; next }
74+
capture && $1 == "##" { exit }
75+
capture { print }
76+
' packages/app/CHANGELOG.md)
77+
[ -z "$BODY" ] && BODY="Release $VERSION"
78+
{
79+
echo "body<<RELEASE_NOTES_EOF"
80+
echo "$BODY"
81+
echo "RELEASE_NOTES_EOF"
82+
} >> "$GITHUB_OUTPUT"
83+
6784
- uses: tauri-apps/tauri-action@v0
6885
env:
6986
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -73,7 +90,7 @@ jobs:
7390
projectPath: packages/app
7491
tagName: app-v__VERSION__
7592
releaseName: 'sbot v__VERSION__'
76-
releaseBody: 'See assets below to download and install this version.'
93+
releaseBody: ${{ steps.notes.outputs.body }}
7794
releaseDraft: true
7895
prerelease: false
7996
includeUpdaterJson: true

.github/workflows/release-helper.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,23 @@ jobs:
6464
6565
- run: pnpm install --frozen-lockfile
6666

67+
- name: Extract release notes
68+
id: notes
69+
shell: bash
70+
run: |
71+
VERSION="${GITHUB_REF_NAME#helper-v}"
72+
BODY=$(awk -v v="$VERSION" '
73+
$1 == "##" && $2 == v { capture=1; next }
74+
capture && $1 == "##" { exit }
75+
capture { print }
76+
' packages/helper/CHANGELOG.md)
77+
[ -z "$BODY" ] && BODY="Release $VERSION"
78+
{
79+
echo "body<<RELEASE_NOTES_EOF"
80+
echo "$BODY"
81+
echo "RELEASE_NOTES_EOF"
82+
} >> "$GITHUB_OUTPUT"
83+
6784
- uses: tauri-apps/tauri-action@v0
6885
env:
6986
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -73,7 +90,7 @@ jobs:
7390
projectPath: packages/helper
7491
tagName: helper-v__VERSION__
7592
releaseName: 'sbot-helper v__VERSION__'
76-
releaseBody: 'See assets below to download and install this version.'
93+
releaseBody: ${{ steps.notes.outputs.body }}
7794
releaseDraft: true
7895
prerelease: false
7996
includeUpdaterJson: true

packages/app/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Changelog
2+
3+
## 0.0.1
4+
- 初始版本

packages/helper/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Changelog
2+
3+
## 0.0.1
4+
- 初始版本

packages/helper/src/UpdaterDialog.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<script setup lang="ts">
2-
import { computed, onMounted, ref } from 'vue'
2+
import { computed, onMounted, ref, shallowRef } from 'vue'
33
import { check, type Update } from '@tauri-apps/plugin-updater'
44
import { relaunch } from '@tauri-apps/plugin-process'
55
66
type Phase = 'idle' | 'available' | 'downloading' | 'ready' | 'error'
77
88
const phase = ref<Phase>('idle')
9-
const update = ref<Update | null>(null)
9+
const update = shallowRef<Update | null>(null)
1010
const error = ref('')
1111
const downloaded = ref(0)
1212
const total = ref(0)

0 commit comments

Comments
 (0)