add go-releaser to prepare release v0.1.0 #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Goreleaser Test | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| pull_request: | |
| branches: [ "master" ] | |
| jobs: | |
| test-goreleaser: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: stable | |
| - name: Install goreleaser | |
| run: | | |
| go install github.com/goreleaser/goreleaser@latest | |
| echo "$HOME/go/bin" >> $GITHUB_PATH | |
| - name: Test goreleaser configuration | |
| run: goreleaser check | |
| - name: Run goreleaser build (snapshot) | |
| run: goreleaser build --snapshot --clean | |
| - name: Verify binaries were created | |
| run: | | |
| ls -la dist/ | |
| echo "=== Checking binaries ===" | |
| find dist/ -type f -name "goclaw*" | head -20 | |
| - name: Test built binary | |
| run: | | |
| BINARY=$(find dist -name "goclaw" -type f | head -1) | |
| if [ -z "$BINARY" ]; then | |
| echo "Binary not found!" | |
| exit 1 | |
| fi | |
| echo "Testing binary: $BINARY" | |
| "$BINARY" version || "$BINARY" --version || "$BINARY" -h || echo "Binary exists but version flag may not be supported" |