Commit 84618f13ef

84618f13ef01a44ece3271c6e63e3db46ad9946b

parent: d30e71a2a5

Unsigned

Wraient <wraient.911@gmail.com> · 2025-01-22 17:06 UTC

Temp

Layout: unified · split

.github/workflows/ci-cd.yml +5 −21
@@ -24,26 +24,6 @@ jobs:
24 - name: Install Dependencies 24 - name: Install Dependencies
25 run: go mod tidy 25 run: go mod tidy
26 26
27 - name: Comment go-winio for Linux Build
28 run: |
29 echo 'function toggle_winio_import() {
30 local action="$1"
31 local file="internal/player.go"
32
33 if [ "$action" == "comment" ]; then
34 sed -i "s|^\\(\\s*\\\"github.com/Microsoft/go-winio\\\"\\)|// \\1|" "$file"
35 sed -i "s|^\\(.*conn, err = winio.DialPipe.*\\)|// \\1|" "$file"
36 elif [ "$action" == "uncomment" ]; then
37 sed -i "s|// \\(\\s*\\\"github.com/Microsoft/go-winio\\\"\\)|\\1|" "$file"
38 sed -i "s|^// \\(.*conn, err = winio.DialPipe.*\\)|\\1|" "$file"
39 fi
40 }
41 toggle_winio_import comment' > toggle_winio_import.sh
42
43 - name: Execute Commenting Function for Linux Build # Comment out lines before Linux build
44 run: |
45 bash toggle_winio_import.sh
46
47 - name: Build Linux binary 27 - name: Build Linux binary
48 run: | 28 run: |
49 ./Build/buildlinux 29 ./Build/buildlinux
@@ -57,12 +37,14 @@ jobs:
57 ./Build/buildwindows 37 ./Build/buildwindows
58 38
59 - name: Upload Artifacts 39 - name: Upload Artifacts
60 uses: actions/upload-artifact@v4 # Updated to version 4 40 uses: actions/upload-artifact@v4
61 with: 41 with:
62 name: curd-binaries 42 name: curd-binaries
63 path: | 43 path: |
64 Build/curd 44 Build/curd
65 Build/curd.exe 45 Build/curd.exe
46 retention-days: 1 # Set retention period
47 if-no-files-found: error # Fail if files are not found
66 48
67 - name: List Build Directory 49 - name: List Build Directory
68 run: | 50 run: |
@@ -96,6 +78,8 @@ jobs:
96 with: 78 with:
97 name: curd-binaries 79 name: curd-binaries
98 path: Build 80 path: Build
81 repository: ${{ github.repository }} # Explicitly set repository
82 github-token: ${{ secrets.GITHUB_TOKEN }} # Add token for authentication
99 83
100 - name: Bump Version 84 - name: Bump Version
101 id: bump_version 85 id: bump_version
Build/buildlinux +1 −1
@@ -1,2 +1,2 @@
1CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o curd -ldflags="-s -w" -trimpath cmd/curd/main.go 1CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o curd -ldflags="-s -w" -trimpath cmd/curd/main.go
2upx --best --ultra-brute curd\ No newline at end of file 2# upx --best --ultra-brute curd\ No newline at end of file
Build/buildwindows +1 −1
@@ -1,2 +1,2 @@
1GOOS=windows GOARCH=amd64 go build -o curd.exe -ldflags "-s -w" ./cmd/curd/main.go 1GOOS=windows GOARCH=amd64 go build -o curd.exe -ldflags "-s -w" ./cmd/curd/main.go
2upx --best --ultra-brute curd.exe\ No newline at end of file 2# upx --best --ultra-brute curd.exe\ No newline at end of file