Skip to content

Commit 140df6e

Browse files
committed
Add Release job to a GitHub workflow
1 parent a68c4a3 commit 140df6e

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

.github/workflows/go.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Go
22

33
on:
44
push:
5+
branches: [ master ]
6+
tags: [ 'v*' ]
57
pull_request:
68

79
jobs:
@@ -29,3 +31,19 @@ jobs:
2931
uses: "golangci/golangci-lint-action@v7"
3032
with:
3133
version: "v2.0"
34+
35+
Release:
36+
if: startsWith(github.ref, 'refs/tags/')
37+
needs: CI
38+
runs-on: ubuntu-latest
39+
steps:
40+
- name: Create Release
41+
id: create_release
42+
uses: actions/create-release@v1
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
with:
46+
tag_name: ${{ github.ref }}
47+
release_name: Release ${{ github.ref }}
48+
draft: false
49+
prerelease: false

0 commit comments

Comments
 (0)