From f658e31c3d5b604d1149aff2708494653a47ece0 Mon Sep 17 00:00:00 2001 From: Marat Radchenko Date: Sun, 24 Sep 2023 19:27:41 +0300 Subject: [PATCH] Add simple CI script to build binaries --- .github/workflows/macos.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/macos.yml diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 0000000000000..dd2f969f0da6a --- /dev/null +++ b/.github/workflows/macos.yml @@ -0,0 +1,33 @@ +name: CI + +on: [push, pull_request] + +jobs: + build: + strategy: + matrix: + arch: + - amd64 + - arm64 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v2 + with: + go-version: "1.21" + - run: | + cp vendor.mod go.mod && cp vendor.sum go.sum + go build -o bin/dockerd-${{ matrix.arch }} ./cmd/dockerd + env: + GOOS: darwin + GOARCH: ${{ matrix.arch }} + - uses: actions/upload-artifact@v3 + with: + name: ${{ matrix.arch }} + path: bin/* + - uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: bin/* + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}