File tree Expand file tree Collapse file tree 1 file changed +0
-73
lines changed
Expand file tree Collapse file tree 1 file changed +0
-73
lines changed Original file line number Diff line number Diff line change 1212 IMAGE_NAME : ${{ github.repository }}
1313
1414jobs :
15- build :
16- runs-on : ubuntu-latest
17- permissions :
18- contents : read
19- packages : write
20-
21- strategy :
22- matrix :
23- include :
24- - goos : linux
25- goarch : amd64
26- - goos : linux
27- goarch : arm64
28- - goos : windows
29- goarch : amd64
30- - goos : darwin
31- goarch : amd64
32- - goos : darwin
33- goarch : arm64
34-
35- steps :
36- - name : Checkout repository
37- uses : actions/checkout@v4
38-
39- - name : Set up Go
40- uses : actions/setup-go@v4
41- with :
42- go-version : ' 1.21'
43-
44- - name : Run tests
45- run : |
46- go test -v -race -short ./...
47-
48- - name : Build binary
49- run : |
50- GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o faceit-cli-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.goos == 'windows' && '.exe' || '' }} main.go
51-
52- - name : Upload build artifacts
53- uses : actions/upload-artifact@v3
54- with :
55- name : faceit-cli-${{ matrix.goos }}-${{ matrix.goarch }}
56- path : faceit-cli-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.goos == 'windows' && '.exe' || '' }}
57-
5815 docker :
5916 runs-on : ubuntu-latest
60- needs : build
6117 permissions :
6218 contents : read
6319 packages : write
9854 labels : ${{ steps.meta.outputs.labels }}
9955 cache-from : type=gha
10056 cache-to : type=gha,mode=max
101-
102- release :
103- runs-on : ubuntu-latest
104- needs : [build, docker]
105- if : startsWith(github.ref, 'refs/tags/')
106- permissions :
107- contents : write
108-
109- steps :
110- - name : Checkout repository
111- uses : actions/checkout@v4
112- with :
113- fetch-depth : 0
114-
115- - name : Download all artifacts
116- uses : actions/download-artifact@v3
117-
118- - name : Create Release
119- uses : softprops/action-gh-release@v1
120- with :
121- files : |
122- dist/faceit-cli-linux-amd64
123- dist/faceit-cli-linux-arm64
124- dist/faceit-cli-windows-amd64.exe
125- dist/faceit-cli-darwin-amd64
126- dist/faceit-cli-darwin-arm64
127- generate_release_notes : true
128- draft : false
129- prerelease : false
You can’t perform that action at this time.
0 commit comments