Skip to content

Commit 465445f

Browse files
authored
Fix auto release on master branch
1 parent 8e289a0 commit 465445f

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,19 @@ jobs:
2424
go-version: 1.14
2525
- name: Build
2626
run: make all
27-
- uses: actions/upload-artifact@v2
28-
with:
29-
name: dist
30-
path: dist
3127
- name: Bump version and push tag
3228
uses: anothrNick/[email protected]
3329
if: github.ref == 'refs/heads/master'
3430
env:
3531
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3632
WITH_V: true
3733
DEFAULT_BUMP: patch
34+
- name: Release
35+
if: github.ref == 'refs/heads/master'
36+
run: make release
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
- uses: actions/upload-artifact@v2
40+
with:
41+
name: dist
42+
path: dist

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ diff: ## git diff
6666
RES=$$(git status --porcelain) ; if [ -n "$$RES" ]; then echo $$RES && exit 1 ; fi
6767

6868
.PHONY: release
69-
release: ## goreleaser release
69+
release: ## goreleaser --rm-dist
7070
go install github.com/goreleaser/goreleaser
71-
goreleaser release
71+
goreleaser --rm-dist
7272

7373
.PHONY: run
7474
run: ## go run

0 commit comments

Comments
 (0)