From 6dce0ab8ea948cb40d027a609683255535226bab Mon Sep 17 00:00:00 2001 From: lanath Date: Tue, 22 Oct 2024 17:17:28 +0200 Subject: [PATCH] ci: adding github action to build go binaries --- .github/workflows/build.yaml | 46 ++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..77ab322 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,46 @@ +name: Build go binaries + +on: push + +jobs: + build-stamusctl: + runs-on: ${{ matrix.runner }} + strategy: + matrix: + include: + - { runner: ubuntu-latest, os: linux, arch: amd64, go-version: 1.22 } + # - { runner: macos-latest, os: darwin, arch: amd64, go-version: 1.22 } + steps: + - uses: actions/checkout@v4 + - name: Setup Go ${{ matrix.go-version }} + uses: actions/setup-go@v5 + with: + go-version: ${{ matrix.go-version }} + - name: Build + run: make cli + - name: Upload + uses: actions/upload-artifact@v4 + with: + name: stamusctl-${{matrix.os}}-${{matrix.arch}} + path: dist/* + + build-stamusdaemon: + runs-on: ${{ matrix.runner }} + strategy: + matrix: + include: + - { runner: ubuntu-latest, os: linux, arch: amd64, go-version: 1.22 } + # - { runner: macos-latest, os: darwin, arch: amd64, go-version: 1.22 } + steps: + - uses: actions/checkout@v4 + - name: Setup Go ${{ matrix.go-version }} + uses: actions/setup-go@v5 + with: + go-version: ${{ matrix.go-version }} + - name: Build + run: make daemon + - name: Upload + uses: actions/upload-artifact@v4 + with: + name: stamusd-${{matrix.os}}-${{matrix.arch}} + path: dist/*