File tree Expand file tree Collapse file tree 2 files changed +53
-15
lines changed Expand file tree Collapse file tree 2 files changed +53
-15
lines changed Original file line number Diff line number Diff line change 1
1
name : Release
2
2
on :
3
+ push :
4
+ tags :
5
+ - ' v*'
3
6
workflow_dispatch :
4
- inputs :
5
- branch :
6
- description : " Branch"
7
- required : true
8
- default : " main"
9
- tag :
10
- description : " Release Tag"
11
-
12
-
13
7
14
8
jobs :
9
+ binary :
10
+ runs-on : ubuntu-latest
11
+ strategy :
12
+ matrix :
13
+ os : [linux, darwin, windows]
14
+ arch : [amd64, arm64]
15
+ steps :
16
+ -
17
+ name : Checkout
18
+ uses : actions/checkout@v4
19
+ -
20
+ name : Setup Go
21
+ uses : actions/setup-go@v5
22
+ with :
23
+ go-version-file : go.mod
24
+ - run : go version
25
+ -
26
+ name : Build
27
+ run : |
28
+ GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} make build
29
+ -
30
+ name : Upload artifacts
31
+ uses : actions/upload-artifact@v4
32
+ with :
33
+ name : compose-spec
34
+ path : ./bin/*
35
+ if-no-files-found : error
36
+
15
37
release :
16
- runs-on : ubuntu-latest
38
+ permissions :
39
+ contents : write # to create a release (ncipollo/release-action)
40
+ runs-on : ubuntu-latest
41
+ needs :
42
+ - binary
17
43
steps :
18
- - name : Release it!
19
- if : ${{ github.event.inputs.tag != '' }} # don't release if no tag is specified
44
+ -
45
+ name : Checkout
46
+ uses : actions/checkout@v4
47
+ -
48
+ name : Download artifacts
49
+ uses : actions/download-artifact@v4
50
+ with :
51
+ name : compose-spec
52
+ path : bin/release
53
+ -
54
+ name : GitHub Release
20
55
uses : ncipollo/release-action@v1
21
56
with :
57
+ artifacts : bin/release/*
22
58
generateReleaseNotes : true
23
59
draft : true
24
60
token : ${{ secrets.GITHUB_TOKEN }}
25
- tag : ${{ github.event.inputs.tag }}
26
- commit : ${{ github.event.inputs.branch }}
Original file line number Diff line number Diff line change 14
14
15
15
IMAGE_PREFIX =composespec/conformance-tests-
16
16
17
+ ifeq ($(OS ) ,Windows_NT)
18
+ BINARY_EXT=.exe
19
+ endif
20
+
17
21
.PHONY : build
18
22
build : # # Build command line
19
- go build -o bin/compose-spec cmd/main.go
23
+ go build -o bin/compose-spec- $( GOOS ) - $( GOARCH )$( BINARY_EXT ) cmd/main.go
20
24
21
25
.PHONY : test
22
26
test : # # Run tests
You can’t perform that action at this time.
0 commit comments