diff --git a/.github/workflows/binary.yml b/.github/workflows/binary.yml new file mode 100644 index 0000000..86e7628 --- /dev/null +++ b/.github/workflows/binary.yml @@ -0,0 +1,67 @@ +name: Binary +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] +jobs: + linux: + name: Build + strategy: + matrix: + operating-system: + - linux + arch: + - '386' + - 'amd64' + runs-on: ubuntu-latest + steps: + - name: Set up Go ${{ matrix.go-versions }} + uses: actions/setup-go@v1 + with: + go-version: 1.14 + id: go + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + - name: Install 32 bits libaries + if: ${{ matrix.arch }} == '386' + run: | + sudo apt-get update && sudo apt-get install gcc-multilib -y -q + - name: Get dependencies + run: | + go get -v -t -d ./... + - name: Build Artifacts + run: | + go build -ldflags="-s -w" + env: + CGO_ENABLED: "1" + GOOS: ${{ matrix.operating-system }} + GOARCH: ${{ matrix.arch }} + windows: + name: Build + strategy: + matrix: + operating-system: + - windows + arch: + - '386' + - 'amd64' + runs-on: windows-latest + steps: + - name: Set up Go ${{ matrix.go-versions }} + uses: actions/setup-go@v1 + with: + go-version: 1.14 + id: go + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + - name: Get dependencies + run: | + go get -v -t -d ./... + - name: Build Artifacts + run: | + go build -ldflags="-s -w" + env: + CGO_ENABLED: "1" + GOOS: ${{ matrix.operating-system }} + GOARCH: ${{ matrix.arch }}