ci: debug-build runs on any branch and produces all platforms #1
Workflow file for this run
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: Debug build | |
| on: | |
| push: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: '.go-version' | |
| check-latest: true | |
| - name: Build all platforms | |
| run: | | |
| mkdir -p out | |
| for target in linux/amd64 linux/arm64 darwin/amd64 darwin/arm64 windows/amd64; do | |
| os="${target%/*}"; arch="${target#*/}" | |
| ext=""; [ "$os" = "windows" ] && ext=".exe" | |
| CGO_ENABLED=0 GOOS=$os GOARCH=$arch \ | |
| go build -o "out/kosli-${os}-${arch}${ext}" ./cmd/kosli/ | |
| done | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: kosli-debug | |
| path: out/ | |
| if-no-files-found: error | |
| retention-days: 14 |