Skip to content

Commit

Permalink
Fix: Fixing forever
Browse files Browse the repository at this point in the history
  • Loading branch information
Wraient committed Oct 26, 2024
1 parent bf2f43b commit 53d134f
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 12 deletions.
33 changes: 23 additions & 10 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@ jobs:
# run: |
# git checkout -- internal/player.go

- name: Build Windows binary
run: |
chmod +x Build/buildwindows
./Build/buildwindows
# - name: Run Tests
# run: go test ./... # Run tests for your Go code

Expand All @@ -70,6 +65,20 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.23.2'

- name: Install Dependencies
run: go mod tidy # Install Go dependencies

- name: Build Windows binary # Run the build script to generate curd.exe
run: |
cd Build # Navigate to Build directory
chmod +x buildwindows
./buildwindows
- name: Download Inno Setup # Clean up
run: |
Invoke-WebRequest -Uri "https://jrsoftware.org/download.php/is.exe" -OutFile "is.exe" # Download Inno Setup installer
Expand All @@ -78,11 +87,6 @@ jobs:
- name: List Build Directory
run: dir

- name: Create Windows Installer
run: |
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" Build/curd-windows-build.iss # Adjust the path to your Inno Setup script
shell: pwsh # Use PowerShell shell

- name: Bump Version
id: bump_version
Expand All @@ -100,6 +104,15 @@ jobs:
git commit -m "Bump version to $new_version"
git tag "v$new_version"
- name: Update Inno Setup Script with New Version
run: |
sed -i "s/AppVersion=.*/AppVersion=${{ steps.bump_version.outputs.new_version }}/" Build/curd-windows-build.iss
- name: Create Windows Installer
run: |
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" "D:\a\curd\curd\Build\curd-windows-build.iss"
shell: pwsh

- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
Expand Down
5 changes: 4 additions & 1 deletion Build/buildwindows
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
GOOS=windows GOARCH=amd64 go build -o Build/curd/curd.exe -ldflags="-s -w" cmd/curd/main.go
@echo off
set GOOS=windows
set GOARCH=amd64
go build -o curd.exe -ldflags="-s -w" -trimpath cmd\curd\main.go
2 changes: 1 addition & 1 deletion Build/curd-windows-build.iss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Name: "desktopicon"; Description: "Create a &desktop shortcut"; GroupDescription

[Files]
; Copy the Curd executable to the install directory
Source: "Build/curd/curd.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "Build/curd.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "Build/mpv.exe"; DestDir: "{app}\bin"; Flags: ignoreversion

[Icons]
Expand Down

0 comments on commit 53d134f

Please sign in to comment.