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 | 24 | - name: Install Dependencies |
| 25 | 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 | 27 | - name: Build Linux binary |
| 48 | 28 | run: | |
| 49 | 29 | ./Build/buildlinux |
| @@ -57,12 +37,14 @@ jobs: |
| 57 | 37 | ./Build/buildwindows |
| 58 | 38 | |
| 59 | 39 | - name: Upload Artifacts |
| 60 | | uses: actions/upload-artifact@v4 # Updated to version 4 |
| 40 | uses: actions/upload-artifact@v4 |
| 61 | 41 | with: |
| 62 | 42 | name: curd-binaries |
| 63 | 43 | path: | |
| 64 | 44 | Build/curd |
| 65 | 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 | 49 | - name: List Build Directory |
| 68 | 50 | run: | |
| @@ -96,6 +78,8 @@ jobs: |
| 96 | 78 | with: |
| 97 | 79 | name: curd-binaries |
| 98 | 80 | path: Build |
| 81 | repository: ${{ github.repository }} # Explicitly set repository |
| 82 | github-token: ${{ secrets.GITHUB_TOKEN }} # Add token for authentication |
| 99 | 83 | |
| 100 | 84 | - name: Bump Version |
| 101 | 85 | id: bump_version |
Build/buildlinux
+1 −1
| @@ -1,2 +1,2 @@ |
| 1 | 1 | CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o curd -ldflags="-s -w" -trimpath cmd/curd/main.go |
| 2 | | upx --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 @@ |
| 1 | 1 | GOOS=windows GOARCH=amd64 go build -o curd.exe -ldflags "-s -w" ./cmd/curd/main.go |
| 2 | | upx --best --ultra-brute curd.exe |
| \ No newline at end of file |
| 2 | # upx --best --ultra-brute curd.exe |
| \ No newline at end of file |