File tree Expand file tree Collapse file tree 4 files changed +19
-2
lines changed Expand file tree Collapse file tree 4 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 11
11
name : Build package (${{ inputs.os }})
12
12
runs-on : ${{ inputs.os }}
13
13
steps :
14
+ - name : Extract Version Name
15
+ id : extract_name
16
+ uses : actions/github-script@v7
17
+ with :
18
+ result-encoding : string
19
+ script : |
20
+ if (context.payload.ref.startsWith('refs/tags/')) {
21
+ return context.payload.ref.replace(/refs\/tags\/v/, '');
22
+ }
23
+ return 'dev';
24
+ - name : Set version
25
+ run : echo ${{ steps.extract_name.outputs.result }} > assets/appversion
14
26
- name : Setup Go
15
27
uses : actions/setup-go@v5
16
28
with :
Original file line number Diff line number Diff line change 85
85
- name : Set version
86
86
env :
87
87
VERSION : ${{ steps.extract_name.outputs.result }}
88
- run : echo %VERSION% > appversion
88
+ run : echo %VERSION% > assets\ appversion
89
89
- name : Move file
90
90
run : mv LargeCsvReader.exe windows
91
91
- name : Create Windows setup
Original file line number Diff line number Diff line change
1
+ dev
Original file line number Diff line number Diff line change @@ -14,11 +14,15 @@ import (
14
14
"fyne.io/fyne/v2/widget"
15
15
"io"
16
16
"os"
17
+ "strings"
17
18
)
18
19
19
20
//go:embed translation
20
21
var translations embed.FS
21
22
23
+ //go:embed assets/appversion
24
+ var version string
25
+
22
26
func showPreviewWindow (filePath string , fyneApp fyne.App ) {
23
27
window := fyneApp .NewWindow (lang .X ("app.preview" , "Preview" ))
24
28
window .Resize (fyne .NewSize (640 , 480 ))
@@ -169,7 +173,7 @@ func main() {
169
173
panic (err )
170
174
}
171
175
172
- window := fyneApp .NewWindow (lang .X ("app.title" , "Large CSV Reader" ))
176
+ window := fyneApp .NewWindow (lang .X ("app.title" , "Large CSV Reader" ) + " (" + strings . TrimSpace ( version ) + ")" )
173
177
window .Resize (fyne .NewSize (640 , 480 ))
174
178
window .SetMaster ()
175
179
You can’t perform that action at this time.
0 commit comments