From 6398f33329998f5481f915c8e71f702ad034ac6d Mon Sep 17 00:00:00 2001 From: Marat Radchenko Date: Sun, 24 Sep 2023 19:23:41 +0300 Subject: [PATCH] Add simple CI to build binaries Signed-off-by: Marat Radchenko --- .github/workflows/darwin.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/darwin.yml diff --git a/.github/workflows/darwin.yml b/.github/workflows/darwin.yml new file mode 100644 index 000000000000..a9e20a213593 --- /dev/null +++ b/.github/workflows/darwin.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@v4 + - uses: actions/setup-go@v5 + with: + go-version: "1.22" + - run: | + go build -o bin/containerd-${{ matrix.arch }} ./cmd/containerd + go build -o bin/ctr-${{ matrix.arch }} ./cmd/ctr + 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 }}