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 11name : Release
22on :
3+ push :
4+ tags :
5+ - ' v*'
36 workflow_dispatch :
4- inputs :
5- branch :
6- description : " Branch"
7- required : true
8- default : " main"
9- tag :
10- description : " Release Tag"
11-
12-
137
148jobs :
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+
1537 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
1743 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
2055 uses : ncipollo/release-action@v1
2156 with :
57+ artifacts : bin/release/*
2258 generateReleaseNotes : true
2359 draft : true
2460 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 1414
1515IMAGE_PREFIX =composespec/conformance-tests-
1616
17+ ifeq ($(OS ) ,Windows_NT)
18+ BINARY_EXT=.exe
19+ endif
20+
1721.PHONY : build
1822build : # # 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
2024
2125.PHONY : test
2226test : # # Run tests
You can’t perform that action at this time.
0 commit comments