Skip to content

Commit

Permalink
Added separate release workflow for releasing the binary (flyteorg#132)
Browse files Browse the repository at this point in the history
* Divide release workflow

Signed-off-by: Yuvraj <code@evalsocket.dev>
  • Loading branch information
yindia authored Jul 5, 2021
1 parent ce1c5f4 commit 5d5ebbd
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 40 deletions.
42 changes: 2 additions & 40 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Master
name: Bump Version

on:
push:
Expand All @@ -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
DEFAULT_BUMP: patch
23 changes: 23 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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 }}

0 comments on commit 5d5ebbd

Please sign in to comment.