File tree 4 files changed +48
-4
lines changed
4 files changed +48
-4
lines changed Original file line number Diff line number Diff line change @@ -3,11 +3,11 @@ name: goreleaser
3
3
on :
4
4
pull_request :
5
5
paths :
6
- - .github/workflows/release.yml
7
- - .goreleaser.yaml
6
+ - .github/workflows/release.yml
7
+ - .goreleaser.yaml
8
8
push :
9
9
tags :
10
- - ' v*'
10
+ - ' v*'
11
11
12
12
permissions :
13
13
contents : read
31
31
32
32
- name : Delete non-semver tags
33
33
run : ' git tag -d $(git tag -l | grep -v "^v")'
34
+
35
+ - name : Set LDFLAGS
36
+ run : echo LDFLAGS="$(make ldflags)" >> $GITHUB_ENV
34
37
35
38
- name : Run GoReleaser on tag
36
39
if : github.event_name != 'pull_request'
53
56
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
54
57
55
58
- uses : actions/upload-artifact@v4
56
- if : ${{ always() }}
59
+ if : github.event_name == 'pull_request'
57
60
with :
58
61
name : binaries
59
62
path : dist/*.tar.gz
Original file line number Diff line number Diff line change 1
1
/_build /
2
+ /dist /
2
3
/_tools /
3
4
/vendor /
4
5
/.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)
30
30
.PHONY : all
31
31
all : build test
32
32
33
+ ldflags :
34
+ @echo $(LDFLAGS )
35
+
33
36
.PHONY : build
34
37
build : $(CMD )
35
38
You can’t perform that action at this time.
0 commit comments