@@ -29,36 +29,41 @@ jobs:
2929 runs-on : ${{ matrix.os }}
3030 needs : release
3131 steps :
32- - name : Checkout
33- uses : actions/checkout@v2
34- -
uses :
olegtarasov/[email protected] 35- id : git_tag
36- with :
37- tagRegex : " v(.*)"
38- tagRegexGroup : 1
39- - name : Install Go
40- uses : actions/setup-go@v2
41- with :
42- go-version : 1.16.x
43- - uses : actions/cache@v2
44- with :
45- path : ~/go/pkg/mod
46- key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
47- restore-keys : |
48- ${{ runner.os }}-go-
49- - name : Test
50- run : make test RACE=1 ENVIRONMENT=production
51- - name : Build
52- run : make build VERSION=${{ steps.git_tag.outputs.tag }} RACE=0 ENVIRONMENT=production
53- env :
54- CGO_ENABLED : 0
55- - name : Upload Release Asset
56- id : upload-release-asset
57- uses : actions/upload-release-asset@v1
58- env :
59- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
60- with :
61- upload_url : ${{ needs.release.outputs.upload_url }}
62- asset_path : ./bin/hosts
63- asset_name : hosts-${{ matrix.os }}-${{ steps.git_tag.outputs.tag }}
64- asset_content_type : application/octet-stream
32+ - name : Checkout
33+ uses : actions/checkout@v2
34+ -
uses :
olegtarasov/[email protected] 35+ id : git_tag
36+ with :
37+ tagRegex : ' v(.*)'
38+ tagRegexGroup : 1
39+ - name : Install Go
40+ uses : actions/setup-go@v2
41+ with :
42+ go-version : 1.16.x
43+ - uses : actions/cache@v2
44+ with :
45+ path : ~/go/pkg/mod
46+ key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
47+ restore-keys : |
48+ ${{ runner.os }}-go-
49+ - name : Test
50+ run : make test RACE=1 ENVIRONMENT=production
51+ - name : Build
52+ run : |
53+ if ["${{ matrix.os }}" = windows-latest]; then
54+ make build VERSION=${{ steps.git_tag.outputs.tag }} RACE=0 ENVIRONMENT=production EXT=.exe;
55+ else
56+ make build VERSION=${{ steps.git_tag.outputs.tag }} RACE=0 ENVIRONMENT=production;
57+ fi
58+ env :
59+ CGO_ENABLED : 0
60+ - name : Upload Release Asset
61+ id : upload-release-asset
62+ uses : actions/upload-release-asset@v1
63+ env :
64+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
65+ with :
66+ upload_url : ${{ needs.release.outputs.upload_url }}
67+ asset_path : ./bin/hosts
68+ asset_name : hosts-${{ matrix.os }}-${{ steps.git_tag.outputs.tag }}
69+ asset_content_type : application/octet-stream
0 commit comments