@@ -9,11 +9,11 @@ concurrency:
9
9
cancel-in-progress : true
10
10
env :
11
11
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' }}
14
14
jobs :
15
15
draft :
16
- if : ${{ startsWith(github.event.release.tag_name, 'desktop_') }}
16
+ if : ${{ github.event_name == 'workflow_dispatch' || startsWith(github.event.release.tag_name, 'desktop_') }}
17
17
runs-on : ubuntu-24.04
18
18
steps :
19
19
- uses : actions/checkout@v4
25
25
channel : ${{ env.RELEASE_CHANNEL }}
26
26
working-directory : ./apps/desktop
27
27
build :
28
- if : ${{ startsWith(github.event.release.tag_name, 'desktop_') }}
28
+ if : ${{ github.event_name == 'workflow_dispatch' || startsWith(github.event.release.tag_name, 'desktop_') }}
29
29
needs : draft
30
30
permissions :
31
31
contents : write
40
40
runs-on : ${{ matrix.runner }}
41
41
steps :
42
42
- 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
43
51
- uses : arduino/setup-protoc@v3
44
52
with :
45
53
repo-token : ${{ secrets.GITHUB_TOKEN }}
85
93
channel : ${{ env.RELEASE_CHANNEL }}
86
94
working-directory : ./apps/desktop
87
95
publish :
88
- if : ${{ startsWith(github.event.release.tag_name, 'desktop_') }}
96
+ if : ${{ github.event_name == 'workflow_dispatch' || startsWith(github.event.release.tag_name, 'desktop_') }}
89
97
needs : build
90
98
runs-on : ubuntu-24.04
91
99
steps :
0 commit comments