Commit 53d134f66f

53d134f66f001d17fc4c66c271dff11265eb5719

parent: bf2f43b58e

Unsigned

Wraient <wraient.911@gmail.com> · 2024-10-26 18:27 UTC

Fix: Fixing forever

Layout: unified · split

.github/workflows/ci-cd.yml +23 −10
@@ -53,11 +53,6 @@ jobs:
53 # run: | 53 # run: |
54 # git checkout -- internal/player.go 54 # git checkout -- internal/player.go
55 55
56 - name: Build Windows binary
57 run: |
58 chmod +x Build/buildwindows
59 ./Build/buildwindows
60
61 # - name: Run Tests 56 # - name: Run Tests
62 # run: go test ./... # Run tests for your Go code 57 # run: go test ./... # Run tests for your Go code
63 58
@@ -70,6 +65,20 @@ jobs:
70 - name: Checkout code 65 - name: Checkout code
71 uses: actions/checkout@v2 66 uses: actions/checkout@v2
72 67
68 - name: Set up Go
69 uses: actions/setup-go@v2
70 with:
71 go-version: '1.23.2'
72
73 - name: Install Dependencies
74 run: go mod tidy # Install Go dependencies
75
76 - name: Build Windows binary # Run the build script to generate curd.exe
77 run: |
78 cd Build # Navigate to Build directory
79 chmod +x buildwindows
80 ./buildwindows
81
73 - name: Download Inno Setup # Clean up 82 - name: Download Inno Setup # Clean up
74 run: | 83 run: |
75 Invoke-WebRequest -Uri "https://jrsoftware.org/download.php/is.exe" -OutFile "is.exe" # Download Inno Setup installer 84 Invoke-WebRequest -Uri "https://jrsoftware.org/download.php/is.exe" -OutFile "is.exe" # Download Inno Setup installer
@@ -78,11 +87,6 @@ jobs:
78 87
79 - name: List Build Directory 88 - name: List Build Directory
80 run: dir 89 run: dir
81
82 - name: Create Windows Installer
83 run: |
84 & "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" Build/curd-windows-build.iss # Adjust the path to your Inno Setup script
85 shell: pwsh # Use PowerShell shell
86 90
87 - name: Bump Version 91 - name: Bump Version
88 id: bump_version 92 id: bump_version
@@ -100,6 +104,15 @@ jobs:
100 git commit -m "Bump version to $new_version" 104 git commit -m "Bump version to $new_version"
101 git tag "v$new_version" 105 git tag "v$new_version"
102 106
107 - name: Update Inno Setup Script with New Version
108 run: |
109 sed -i "s/AppVersion=.*/AppVersion=${{ steps.bump_version.outputs.new_version }}/" Build/curd-windows-build.iss
110
111 - name: Create Windows Installer
112 run: |
113 & "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" "D:\a\curd\curd\Build\curd-windows-build.iss"
114 shell: pwsh
115
103 - name: Create Release 116 - name: Create Release
104 id: create_release 117 id: create_release
105 uses: softprops/action-gh-release@v1 118 uses: softprops/action-gh-release@v1
Build/buildwindows +4 −1
@@ -1 +1,4 @@
1GOOS=windows GOARCH=amd64 go build -o Build/curd/curd.exe -ldflags="-s -w" cmd/curd/main.go\ No newline at end of file 1@echo off
2set GOOS=windows
3set GOARCH=amd64
4go build -o curd.exe -ldflags="-s -w" -trimpath cmd\curd\main.go\ No newline at end of file
Build/curd-windows-build.iss +1 −1
@@ -15,7 +15,7 @@ Name: "desktopicon"; Description: "Create a &desktop shortcut"; GroupDescription
15 15
16[Files] 16[Files]
17; Copy the Curd executable to the install directory 17; Copy the Curd executable to the install directory
18Source: "Build/curd/curd.exe"; DestDir: "{app}"; Flags: ignoreversion 18Source: "Build/curd.exe"; DestDir: "{app}"; Flags: ignoreversion
19Source: "Build/mpv.exe"; DestDir: "{app}\bin"; Flags: ignoreversion 19Source: "Build/mpv.exe"; DestDir: "{app}\bin"; Flags: ignoreversion
20 20
21[Icons] 21[Icons]