2.2.1 - Fixing on decryption #24
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
| # This workflow will build a golang project | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | |
| name: Go | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| # Define a matrix for different GOOS/GOARCH combinations | |
| strategy: | |
| matrix: | |
| goos: [linux, windows, darwin] # Example: Build for common OSes | |
| goarch: [amd64, 386, arm64] # Include your desired architectures (amd64, x86/386, arm64) | |
| # Exclude combinations that don't make sense or aren't supported | |
| exclude: | |
| - goos: windows | |
| goarch: arm64 | |
| - goos: darwin | |
| goarch: 386 | |
| # Use the matrix values in the job name | |
| name: Build ${{ matrix.goos }}-${{ matrix.goarch }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.22.x' | |
| cache: false | |
| # Build each command separately | |
| - name: Cross-Compile | |
| env: | |
| GOOS: ${{ matrix.goos }} | |
| GOARCH: ${{ matrix.goarch }} | |
| run: | | |
| mkdir -p dist | |
| EXT="" | |
| if [ "${{ matrix.goos }}" = "windows" ]; then | |
| EXT=".exe" | |
| fi | |
| # Build pocsag encoder | |
| go build -v -o "dist/pocsag-${{ matrix.goos }}-${{ matrix.goarch }}${EXT}" ./cmd/pocsag | |
| # Build pocsag-decode decoder | |
| go build -v -o "dist/pocsag-decode-${{ matrix.goos }}-${{ matrix.goarch }}${EXT}" ./cmd/pocsag-decode | |
| # Build pocsag-burst | |
| go build -v -o "dist/pocsag-burst-${{ matrix.goos }}-${{ matrix.goarch }}${EXT}" ./cmd/pocsag-burst | |
| # Run tests (only on linux-amd64 to save time) | |
| - name: Test | |
| if: matrix.goos == 'linux' && matrix.goarch == 'amd64' | |
| run: go test -v ./... | |
| # Upload all binaries as artifacts | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: binaries-${{ matrix.goos }}-${{ matrix.goarch }} | |
| path: dist/* |