File tree Expand file tree Collapse file tree 4 files changed +103
-0
lines changed Expand file tree Collapse file tree 4 files changed +103
-0
lines changed Original file line number Diff line number Diff line change 1+ name : goreleaser 
2+ 
3+ on :
4+   pull_request :
5+     paths :
6+       - .github/workflows/release.yml 
7+       - .goreleaser.yaml 
8+   push :
9+     tags :
10+       - ' v*' 
11+ 
12+ permissions :
13+   contents : read 
14+ 
15+ jobs :
16+   release :
17+     runs-on : ubuntu-latest 
18+ 
19+     permissions :
20+       contents : write 
21+ 
22+     steps :
23+       - name : Checkout 
24+         uses : actions/checkout@v3 
25+         with :
26+           fetch-depth : 0 
27+     
28+       - uses : actions/setup-go@v5 
29+         with :
30+           go-version : v1.22.10 
31+     
32+       - name : Delete non-semver tags 
33+         run : ' git tag -d $(git tag -l | grep -v "^v")' 
34+       
35+       - name : Set LDFLAGS 
36+         run : echo LDFLAGS="$(make ldflags)" >> $GITHUB_ENV 
37+     
38+       - name : Run GoReleaser on tag 
39+         if : github.event_name != 'pull_request' 
40+         uses : goreleaser/goreleaser-action@v6 
41+         with :
42+           distribution : goreleaser 
43+           version : latest 
44+           args : release --timeout 60m 
45+         env :
46+           GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} 
47+     
48+       - name : Run GoReleaser on pull request 
49+         if : github.event_name == 'pull_request' 
50+         uses : goreleaser/goreleaser-action@v6 
51+         with :
52+           distribution : goreleaser 
53+           version : latest 
54+           args : release --timeout 60m --snapshot 
55+         env :
56+           GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} 
57+     
58+       - uses : actions/upload-artifact@v4 
59+         if : github.event_name == 'pull_request' 
60+         with :
61+           name : binaries 
62+           path : dist/*.tar.gz 
Original file line number Diff line number Diff line change 11/_build /
2+ /dist /
23/_tools /
34/vendor /
45/.kcp.e2e /
Original file line number Diff line number Diff line change 1+ #  Copyright 2025 The KCP Authors.
2+ # 
3+ #  Licensed under the Apache License, Version 2.0 (the "License");
4+ #  you may not use this file except in compliance with the License.
5+ #  You may obtain a copy of the License at
6+ # 
7+ #      http://www.apache.org/licenses/LICENSE-2.0
8+ # 
9+ #  Unless required by applicable law or agreed to in writing, software
10+ #  distributed under the License is distributed on an "AS IS" BASIS,
11+ #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ #  See the License for the specific language governing permissions and
13+ #  limitations under the License.
14+ 
15+ builds :
16+   - id : " api-syncagent" 
17+     main : ./cmd/api-syncagent 
18+     binary : api-syncagent 
19+     ldflags :
20+       - " {{ .Env.LDFLAGS }}" 
21+     goos :
22+       - linux 
23+       - darwin 
24+     goarch :
25+       - amd64 
26+       - arm64 
27+     env :
28+       - CGO_ENABLED=0 
29+ 
30+ archives :
31+   - id : api-syncagent 
32+     builds :
33+       - api-syncagent 
34+ 
35+ release :
36+   draft : true 
37+   mode : keep-existing 
Original file line number Diff line number Diff line change @@ -30,6 +30,9 @@ GOOS ?= $(shell go env GOOS)
3030.PHONY : all
3131all : build test
3232
33+ ldflags :
34+ 	@echo $(LDFLAGS ) 
35+ 
3336.PHONY : build
3437build : $(CMD ) 
3538
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments