Skip to content

Commit 14eba14

Browse files
committed
support stable release in desktop_cd
1 parent b721bc4 commit 14eba14

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

.github/workflows/desktop_cd.yaml

+14-5
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ 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: ${{ env.RELEASE_CHANNEL == 'nightly' && './src-tauri/tauri.conf.nightly.json' || './src-tauri/tauri.conf.stable.json' }}
14+
ENABLED: ${{ github.event_name == 'workflow_dispatch' || startsWith(github.event.release.tag_name, 'desktop_') }}
1415
jobs:
1516
draft:
16-
if: ${{ startsWith(github.event.release.tag_name, 'desktop_') }}
17+
if: ${{ env.ENABLED == 'true' }}
1718
runs-on: ubuntu-24.04
1819
steps:
1920
- uses: actions/checkout@v4
@@ -25,7 +26,7 @@ jobs:
2526
channel: ${{ env.RELEASE_CHANNEL }}
2627
working-directory: ./apps/desktop
2728
build:
28-
if: ${{ startsWith(github.event.release.tag_name, 'desktop_') }}
29+
if: ${{ env.ENABLED == 'true' }}
2930
needs: draft
3031
permissions:
3132
contents: write
@@ -40,6 +41,14 @@ jobs:
4041
runs-on: ${{ matrix.runner }}
4142
steps:
4243
- uses: actions/checkout@v4
44+
- run: |
45+
VERSION=$(jq -r '.version' ./apps/desktop/src-tauri/tauri.conf.json)
46+
TAG_NAME="${{ github.event.release.tag_name }}"
47+
echo "Version: $VERSION, Tag name: $TAG_NAME"
48+
if [[ ! "$TAG_NAME" == *"$VERSION"* ]]; then
49+
exit 1
50+
fi
51+
shell: bash
4352
- uses: arduino/setup-protoc@v3
4453
with:
4554
repo-token: ${{ secrets.GITHUB_TOKEN }}
@@ -85,7 +94,7 @@ jobs:
8594
channel: ${{ env.RELEASE_CHANNEL }}
8695
working-directory: ./apps/desktop
8796
publish:
88-
if: ${{ startsWith(github.event.release.tag_name, 'desktop_') }}
97+
if: ${{ env.ENABLED == 'true' }}
8998
needs: build
9099
runs-on: ubuntu-24.04
91100
steps:

apps/docs/.vitepress/config.mts

+6-2
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)