1616 steps :
1717 - name : Checkout code
1818 uses : actions/checkout@v3
19+ with :
20+ fetch-depth : 0
1921
2022 - name : Set up Go
2123 uses : actions/setup-go@v4
@@ -24,42 +26,65 @@ jobs:
2426
2527 - name : Get version from tag
2628 id : get_version
27- run : echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
29+ run : echo "VERSION=${GITHUB_REF#refs/tags/v }" >> $GITHUB_ENV
2830
2931 - name : Build for all platforms
3032 run : |
31- # Create build directories
32- mkdir -p dist
33+ BUILD_DATE=$(date -u '+%Y-%m-%d %H:%M:%S UTC')
34+ GIT_COMMIT=$(git rev-parse --short HEAD)
3335
34- # Set build flags
35- BUILD_FLAGS="-s -w -X github.com/rafabd1/SecretHound/cmd.Version=${VERSION} -X github.com/rafabd1/SecretHound/cmd.BuildDate=$(date -u +%Y-%m-%d) - X github.com/rafabd1/SecretHound/cmd.GitCommit=${GITHUB_SHA}"
36+ # Build for Windows
37+ GOOS=windows GOARCH=amd64 go build -ldflags " -X github.com/rafabd1/SecretHound/cmd.Version=${{ env. VERSION }} -X ' github.com/rafabd1/SecretHound/cmd.BuildDate=${BUILD_DATE}' - X github.com/rafabd1/SecretHound/cmd.GitCommit=${GIT_COMMIT}" -o secrethound-${{ env.VERSION }}-windows-amd64.exe ./cmd/secrethound/
3638
3739 # Build for Linux
38- GOOS=linux GOARCH=amd64 go build -ldflags="${BUILD_FLAGS}" -o dist/secrethound-linux-amd64 ./cmd/secrethound
39-
40- # Build for Windows
41- GOOS=windows GOARCH=amd64 go build -ldflags="${BUILD_FLAGS}" -o dist/secrethound-windows-amd64.exe ./cmd/secrethound
40+ GOOS=linux GOARCH=amd64 go build -ldflags "-X github.com/rafabd1/SecretHound/cmd.Version=${{ env.VERSION }} -X 'github.com/rafabd1/SecretHound/cmd.BuildDate=${BUILD_DATE}' -X github.com/rafabd1/SecretHound/cmd.GitCommit=${GIT_COMMIT}" -o secrethound-${{ env.VERSION }}-linux-amd64 ./cmd/secrethound/
4241
4342 # Build for macOS
44- GOOS=darwin GOARCH=amd64 go build -ldflags="${BUILD_FLAGS}" -o dist/secrethound-darwin-amd64 ./cmd/secrethound
45-
46- # Create checksums
47- cd dist
48- sha256sum secrethound-linux-amd64 secrethound-windows-amd64.exe secrethound-darwin-amd64 > checksums.txt
49- cd ..
50-
43+ GOOS=darwin GOARCH=amd64 go build -ldflags "-X github.com/rafabd1/SecretHound/cmd.Version=${{ env.VERSION }} -X 'github.com/rafabd1/SecretHound/cmd.BuildDate=${BUILD_DATE}' -X github.com/rafabd1/SecretHound/cmd.GitCommit=${GIT_COMMIT}" -o secrethound-${{ env.VERSION }}-darwin-amd64 ./cmd/secrethound/
44+
5145 - name : Create Release
5246 id : create_release
5347 uses : softprops/action-gh-release@v1
48+ env :
49+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5450 with :
55- files : |
56- dist/secrethound-linux-amd64
57- dist/secrethound-windows-amd64.exe
58- dist/secrethound-darwin-amd64
59- dist/checksums.txt
60- name : SecretHound ${{ env.VERSION }}
51+ name : SecretHound v${{ env.VERSION }}
6152 draft : false
6253 prerelease : false
63- generate_release_notes : true
64- env :
65- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
54+ files : |
55+ secrethound-${{ env.VERSION }}-windows-amd64.exe
56+ secrethound-${{ env.VERSION }}-linux-amd64
57+ secrethound-${{ env.VERSION }}-darwin-amd64
58+ body : |
59+ # SecretHound v${{ env.VERSION }}
60+
61+ ## Improvements
62+ - Removed global execution timeout allowing scans to run without time constraints
63+ - Enhanced error logging with better visibility for critical errors
64+ - Improved log output reducing redundant messages and clarifying statistics
65+ - Fixed build information display in version command
66+ - Added proper build date and git commit tracking
67+ - Optimized progress display with cleaner output
68+
69+ ## Bug Fixes
70+ - Fixed issue with timeout prematurely ending large scans
71+ - Resolved silent errors in verbose mode
72+
73+ ## Installation
74+
75+ Download the appropriate binary for your platform and make it executable.
76+
77+ For Linux/macOS:
78+ ```
79+ chmod +x secrethound-${{ env.VERSION }}-linux-amd64
80+ ./secrethound-${{ env.VERSION }}-linux-amd64
81+ ```
82+
83+ For Go users:
84+ ```
85+ go install github.com/rafabd1/SecretHound/cmd/secrethound@latest
86+ ```
87+
88+ ## Documentation
89+
90+ See the [documentation](https://github.com/rafabd1/SecretHound/tree/main/docs) for details on usage.
0 commit comments