Skip to content

Commit d4c308a

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

1 file changed

Lines changed: 23 additions & 5 deletions

File tree

.github/workflows/go.yaml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,22 @@ name: Go
22

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

79
jobs:
810
CI:
911
strategy:
1012
matrix:
11-
go_version: [ "1.18.x", "1.24.x" ]
13+
go_version: [ "1.13.x", "1.18.x" ]
1214

1315
runs-on: "ubuntu-latest"
1416
steps:
15-
- uses: "actions/checkout@v4"
17+
- uses: "actions/checkout@v3"
1618

1719
- name: "Set up Go"
18-
uses: "actions/setup-go@v5"
20+
uses: "actions/setup-go@v3"
1921
with:
2022
go-version: ${{ matrix.go_version }}
2123

@@ -26,6 +28,22 @@ jobs:
2628
run: "go test -v ./..."
2729

2830
- name: "Linter"
29-
uses: "golangci/golangci-lint-action@v7"
31+
uses: "golangci/golangci-lint-action@v3"
3032
with:
31-
version: "v2.0"
33+
version: "v1.48"
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)