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 | 53 | # run: | |
| 54 | 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 | 56 | # - name: Run Tests |
| 62 | 57 | # run: go test ./... # Run tests for your Go code |
| 63 | 58 | |
| @@ -70,6 +65,20 @@ jobs: |
| 70 | 65 | - name: Checkout code |
| 71 | 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 | 82 | - name: Download Inno Setup # Clean up |
| 74 | 83 | run: | |
| 75 | 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 | 88 | - name: List Build Directory |
| 80 | 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 | 91 | - name: Bump Version |
| 88 | 92 | id: bump_version |
| @@ -100,6 +104,15 @@ jobs: |
| 100 | 104 | git commit -m "Bump version to $new_version" |
| 101 | 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 | 116 | - name: Create Release |
| 104 | 117 | id: create_release |
| 105 | 118 | uses: softprops/action-gh-release@v1 |
Build/buildwindows
+4 −1
| @@ -1 +1,4 @@ |
| 1 | | GOOS=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 |
| 2 | set GOOS=windows |
| 3 | set GOARCH=amd64 |
| 4 | go 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 | 16 | [Files]
|
| 17 | 17 | ; Copy the Curd executable to the install directory
|
| 18 | | Source: "Build/curd/curd.exe"; DestDir: "{app}"; Flags: ignoreversion
|
| 18 | Source: "Build/curd.exe"; DestDir: "{app}"; Flags: ignoreversion
|
| 19 | 19 | Source: "Build/mpv.exe"; DestDir: "{app}\bin"; Flags: ignoreversion
|
| 20 | 20 |
|
| 21 | 21 | [Icons]
|