File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 33on :
44 push :
55 branches : [ main ]
6+ tags :
7+ - ' v*'
68 pull_request :
79 branches : [ main ]
810
9597 with :
9698 name : build-artifacts
9799 path : dist/
100+
101+ release :
102+ if : github.ref_type == 'tag'
103+ runs-on : ubuntu-latest
104+ needs : [build]
105+ steps :
106+ - name : Checkout code
107+ uses : actions/checkout@v4
108+ with :
109+ fetch-depth : 0
110+
111+ - name : Set up Go
112+ uses : actions/setup-go@v5
113+ with :
114+ go-version : ' 1.22'
115+ check-latest : true
116+
117+ - name : Run tests
118+ run : go test -v ./...
119+
120+ - name : Run GoReleaser
121+ if : ${{ secrets.HOMEBREW_TAP_TOKEN != '' }}
122+ uses : goreleaser/goreleaser-action@v6
123+ with :
124+ version : latest
125+ args : release --clean
126+ env :
127+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
128+ HOMEBREW_TAP_TOKEN : ${{ secrets.HOMEBREW_TAP_TOKEN }}
129+
130+ - name : Run GoReleaser (skip Homebrew tap update)
131+ if : ${{ secrets.HOMEBREW_TAP_TOKEN == '' }}
132+ uses : goreleaser/goreleaser-action@v6
133+ with :
134+ version : latest
135+ args : release --clean --skip=brews
136+ env :
137+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments