Skip to content

Commit 9227f07

Browse files
committed
support stable release in desktop_cd
1 parent b721bc4 commit 9227f07

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

.github/workflows/desktop_cd.yaml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ concurrency:
99
cancel-in-progress: true
1010
env:
1111
CN_APPLICATION: "fastrepl/hyprnote"
12-
RELEASE_CHANNEL: ${{ endsWith(github.event.release.tag_name, 'nightly') && 'nightly' || '' }}
13-
TAURI_CONF_PATH: ${{ endsWith(github.event.release.tag_name, 'nightly') && './src-tauri/tauri.conf.nightly.json' || './src-tauri/tauri.conf.stable.json' }}
12+
RELEASE_CHANNEL: ${{ github.event_name == 'workflow_dispatch' && 'stable' || 'nightly' }}
13+
TAURI_CONF_PATH: ${{ github.event_name == 'workflow_dispatch' && './src-tauri/tauri.conf.stable.json' || './src-tauri/tauri.conf.nightly.json' }}
1414
jobs:
1515
draft:
16-
if: ${{ startsWith(github.event.release.tag_name, 'desktop_') }}
16+
if: ${{ github.event_name == 'workflow_dispatch' || startsWith(github.event.release.tag_name, 'desktop_') }}
1717
runs-on: ubuntu-24.04
1818
steps:
1919
- uses: actions/checkout@v4
@@ -25,7 +25,7 @@ jobs:
2525
channel: ${{ env.RELEASE_CHANNEL }}
2626
working-directory: ./apps/desktop
2727
build:
28-
if: ${{ startsWith(github.event.release.tag_name, 'desktop_') }}
28+
if: ${{ github.event_name == 'workflow_dispatch' || startsWith(github.event.release.tag_name, 'desktop_') }}
2929
needs: draft
3030
permissions:
3131
contents: write
@@ -40,6 +40,14 @@ jobs:
4040
runs-on: ${{ matrix.runner }}
4141
steps:
4242
- uses: actions/checkout@v4
43+
- run: |
44+
VERSION=$(jq -r '.version' ./apps/desktop/src-tauri/tauri.conf.json)
45+
TAG_NAME="${{ github.event.release.tag_name }}"
46+
echo "Version: $VERSION, Tag name: $TAG_NAME"
47+
if [[ ! "$TAG_NAME" == *"$VERSION"* ]]; then
48+
exit 1
49+
fi
50+
shell: bash
4351
- uses: arduino/setup-protoc@v3
4452
with:
4553
repo-token: ${{ secrets.GITHUB_TOKEN }}
@@ -85,7 +93,7 @@ jobs:
8593
channel: ${{ env.RELEASE_CHANNEL }}
8694
working-directory: ./apps/desktop
8795
publish:
88-
if: ${{ startsWith(github.event.release.tag_name, 'desktop_') }}
96+
if: ${{ github.event_name == 'workflow_dispatch' || startsWith(github.event.release.tag_name, 'desktop_') }}
8997
needs: build
9098
runs-on: ubuntu-24.04
9199
steps:

apps/docs/.vitepress/config.mts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,12 @@ const vitepressConfig: Parameters<typeof defineConfig>[0] = {
3535
text: "Download",
3636
items: [
3737
{
38-
text: "Nightly",
39-
link: "https://cdn.crabnebula.app/download/fastrepl/hyprnote/latest/platform/dmg-aarch64?channel=nightly",
38+
text: "MacOS (Silicon)",
39+
link: "https://cdn.crabnebula.app/download/fastrepl/hyprnote/latest/platform/dmg-aarch64",
40+
},
41+
{
42+
text: "MacOS (Intel)",
43+
link: "https://cdn.crabnebula.app/download/fastrepl/hyprnote/latest/platform/dmg-x86_64",
4044
},
4145
],
4246
},

0 commit comments

Comments
 (0)