Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 3 additions & 15 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,27 +46,15 @@ jobs:

- name: Build Linux binary
run: |
pwd
tree ./
outputDir="Build"
mkdir -p "$outputDir"
go build -o "$outputDir/curd" ./cmd/curd/main.go
pwd
tree ./
./Build/buildlinux

- name: Revert Changes in player.go
run: |
git checkout -- internal/player.go

- name: Build Windows binary (cross-compile)
run: |
pwd
tree ./
outputDir="Build"
mkdir -p "$outputDir"
GOOS=windows GOARCH=amd64 go build -o "$outputDir/curd.exe" ./cmd/curd/main.go
pwd
tree ./
./Build/buildwindows

- name: Upload Artifacts
uses: actions/upload-artifact@v4 # Updated to version 4
Expand Down Expand Up @@ -131,6 +119,6 @@ jobs:
files: |
Build/curd
Build/curd.exe
Build/curdInstaller.exe
Build/Output/CurdInstaller.exe
env:
GITHUB_TOKEN: ${{ secrets.ACTIONS_PAT }}
6 changes: 4 additions & 2 deletions Build/buildlinux
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o curd -ldflags="-s -w" -trimpath cmd/curd/main.go
upx --best --ultra-brute curd
outputDir="Build"
mkdir -p "$outputDir"
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o "$outputDir/curd" -ldflags="-s -w" -trimpath cmd/curd/main.go
upx --best --ultra-brute "$outputDir/curd"
17 changes: 3 additions & 14 deletions Build/buildwindows
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
@echo off
echo Starting the build process...
set GOOS=windows
set GOARCH=amd64
echo GOOS is set to %GOOS%
echo GOARCH is set to %GOARCH%
echo Building Go application...
tree /F
go build -o curd.exe .\cmd\curd\main.go
if %ERRORLEVEL% NEQ 0 (
echo Build failed with error level %ERRORLEVEL%
) else (
echo Build completed successfully!
)
outputDir="Build"
mkdir -p "$outputDir"
GOOS=windows GOARCH=amd64 go build -o "$outputDir/curd.exe" -ldflags "-s -w" ./cmd/curd/main.go