Skip to content

Commit 767da41

Browse files
committed
release package only when tests and code quality passes
1 parent 4061c06 commit 767da41

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

.github/workflows/go.yaml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,22 @@ jobs:
2424
run: |
2525
go test ./...
2626
27+
code_quality:
28+
name: Code Quality🎖️
29+
runs-on: ubuntu-latest
30+
container: "golangci/golangci-lint:v1.62.2"
31+
steps:
32+
- name: Check out code into the Go module directory
33+
uses: actions/checkout@v4
34+
- name: Get dependencies
35+
run: go get -v -t -d ./...
36+
- name: GolangCI-Lint
37+
run: |
38+
golangci-lint run --timeout 9m0s
39+
2740
release_package:
2841
if: ${{ startsWith(github.ref, 'refs/tags/v')}}
42+
needs: [test_and_build,code_quality]
2943
runs-on: ubuntu-latest
3044

3145
permissions:
@@ -62,16 +76,3 @@ jobs:
6276
context: .
6377
file: Dockerfile
6478
tags: zopdev/static-server:${{ env.RELEASE_VERSION }}
65-
66-
code_quality:
67-
name: Code Quality🎖️
68-
runs-on: ubuntu-latest
69-
container: "golangci/golangci-lint:v1.62.2"
70-
steps:
71-
- name: Check out code into the Go module directory
72-
uses: actions/checkout@v4
73-
- name: Get dependencies
74-
run: go get -v -t -d ./...
75-
- name: GolangCI-Lint
76-
run: |
77-
golangci-lint run --timeout 9m0s

0 commit comments

Comments
 (0)