From 4c0dfa34c28e337c0c1fda449865c0210e1d3aa9 Mon Sep 17 00:00:00 2001 From: kolikons Date: Sun, 6 Oct 2024 12:32:53 +0300 Subject: [PATCH] improve ci --- .github/workflows/ci-release.yaml | 29 +++++++++++++++++++++++++++++ .github/workflows/ci.yaml | 13 +------------ 2 files changed, 30 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/ci-release.yaml diff --git a/.github/workflows/ci-release.yaml b/.github/workflows/ci-release.yaml new file mode 100644 index 0000000..3704b37 --- /dev/null +++ b/.github/workflows/ci-release.yaml @@ -0,0 +1,29 @@ +name: Go Build via release +on: + pull_request: + paths: + - "cmd/**" + - "pkg/**" + - .goreleaser.yaml + - Dockerfile +jobs: + ci-build: + runs-on: ubuntu-latest + name: Build & Test + steps: + - uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - uses: actions/setup-go@v5 + with: + go-version: 1.18 + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v6 + with: + args: release --snapshot --clean --skip=publish,sign diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f0480f8..7ebd9e6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -13,18 +13,12 @@ jobs: build: strategy: matrix: - os: [ubuntu-latest] + os: [ubuntu-latest, macOS-latest] runs-on: ${{ matrix.os }} name: Build & Test steps: - uses: actions/checkout@v4 - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - uses: actions/setup-go@v5 with: go-version: 1.18 @@ -35,8 +29,3 @@ jobs: run: | go build -v . go test ./... - - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v6 - with: - args: release --snapshot --clean --skip=publish,sign