From 5c7133784a18ffbd3d67b4c9ef4e5320fa624f88 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Mon, 5 Jul 2021 16:58:39 +0530 Subject: [PATCH] Added separate release workflow for releasing the binary (#132) * Divide release workflow Signed-off-by: Yuvraj --- flytectl/.github/workflows/master.yml | 42 ++------------------------ flytectl/.github/workflows/release.yml | 23 ++++++++++++++ 2 files changed, 25 insertions(+), 40 deletions(-) create mode 100644 flytectl/.github/workflows/release.yml diff --git a/flytectl/.github/workflows/master.yml b/flytectl/.github/workflows/master.yml index 3e21b83bd7..320f92c4ce 100644 --- a/flytectl/.github/workflows/master.yml +++ b/flytectl/.github/workflows/master.yml @@ -1,4 +1,4 @@ -name: Master +name: Bump Version on: push: @@ -22,42 +22,4 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.FLYTE_BOT_PAT }} WITH_V: true - DEFAULT_BUMP: patch - - goreleaser: - name: Release flytectl - runs-on: ubuntu-latest - needs: [ bump-version ] - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: "0" - - name: Run GoReleaser dry run - uses: goreleaser/goreleaser-action@v2 - with: - version: latest - args: release --rm-dist - env: - GITHUB_TOKEN: ${{ secrets.FLYTE_BOT_PAT }} - - test: - name: Run tests and lint - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: "0" - - name: Unit Tests - uses: cedrickring/golang-action@1.5.2 - env: - GO111MODULE: "on" - with: - args: make install && make test_unit_codecov - - name: Lint - uses: cedrickring/golang-action@1.5.2 - env: - GO111MODULE: "on" - with: - args: make install && make lint \ No newline at end of file + DEFAULT_BUMP: patch \ No newline at end of file diff --git a/flytectl/.github/workflows/release.yml b/flytectl/.github/workflows/release.yml new file mode 100644 index 0000000000..1e4c78aa08 --- /dev/null +++ b/flytectl/.github/workflows/release.yml @@ -0,0 +1,23 @@ +name: Release Flytectl + +on: + push: + tags: + - 'v*' + +jobs: + releaser: + name: Release flytectl + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: "0" + - name: Run GoReleaser dry run + uses: goreleaser/goreleaser-action@v2 + with: + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.FLYTE_BOT_PAT }}