From a20bfe6de7b7470b08c252dc928ae419f9d807ca Mon Sep 17 00:00:00 2001 From: Vaibhav Singh <0vaibhavsingh0@gmail.com> Date: Wed, 26 Jun 2024 17:35:46 -0300 Subject: [PATCH] chore: update ci --- .github/workflows/build.yaml | 26 -------------------------- .github/workflows/go-test.yaml | 17 +++++++++++++++++ .github/workflows/release.yaml | 28 ++++++++++++++++++++++++++++ .github/workflows/tests.yaml | 23 ----------------------- 4 files changed, 45 insertions(+), 49 deletions(-) delete mode 100644 .github/workflows/build.yaml create mode 100644 .github/workflows/go-test.yaml create mode 100644 .github/workflows/release.yaml delete mode 100644 .github/workflows/tests.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml deleted file mode 100644 index ee2b363..0000000 --- a/.github/workflows/build.yaml +++ /dev/null @@ -1,26 +0,0 @@ -name: Go Build - -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - build: - name: Build - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: "1.22.4" - - - name: Build - run: go build -v ./... - - - name: Verify dependencies - run: go mod verify diff --git a/.github/workflows/go-test.yaml b/.github/workflows/go-test.yaml new file mode 100644 index 0000000..e9af56b --- /dev/null +++ b/.github/workflows/go-test.yaml @@ -0,0 +1,17 @@ +name: Go-test +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: "1.22.x" + - name: Build + run: go build -v ./... + - name: Test with the Go CLI + run: go test ./... diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..622086e --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,28 @@ +name: goreleaser + +on: + push: + tags: + - "v*.*.*" + +permissions: + contents: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: "1.21.1" + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v5.0.0 + with: + distribution: goreleaser + version: ${{ env.GITHUB_REF_NAME }} + args: release --clean + workdir: ./ + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml deleted file mode 100644 index 4490953..0000000 --- a/.github/workflows/tests.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: Go Test - -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - test: - name: Run Tests - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: "1.22.4" - - - name: Run tests - run: go test ./load_balancer -v