2727 #git config --global --add safe.directory $GITHUB_WORKSPACE
2828 CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o dist/linux-amd64/xtractl -ldflags="-s -w -X ${CMD_GIT_TAG} -X ${CMD_GIT_SHA} -X ${CMD_GIT_BRANCH}"
2929 CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o dist/linux-arm64/xtractl -ldflags="-s -w -X ${CMD_GIT_TAG} -X ${CMD_GIT_SHA} -X ${CMD_GIT_BRANCH}"
30+ CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o dist/darwin-arm64/xtractl -ldflags="-s -w -X ${CMD_GIT_TAG} -X ${CMD_GIT_SHA} -X ${CMD_GIT_BRANCH}"
3031 cp Dockerfile dist/
3132 - name : log1
3233 run : |
@@ -46,19 +47,20 @@ jobs:
4647 name : dist
4748 path : ./xtractl/dist
4849 retention-days : 1
49- - name : release
50+ - name : release-github
5051 # if: ${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'v') }}
5152 working-directory : ./xtractl/dist
5253 env :
5354 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5455 run : |
55- chmod +x ./linux-amd64/xtractl
56- chmod +x ./linux-arm64/xtractl
56+ chmod +x ./*/xtractl
5757 tar -czvf xtractl_${{ github.ref_name }}_linux_amd64.tar.gz -C ./linux-amd64 xtractl
5858 tar -czvf xtractl_${{ github.ref_name }}_linux_arm64.tar.gz -C ./linux-arm64 xtractl
59+ tar -czvf xtractl_${{ github.ref_name }}_macos_arm64.tar.gz -C ./darwin-arm64 xtractl
5960 gh release create ${{ github.ref_name }} --title ${{ github.ref_name }} --draft
6061 gh release upload ${{ github.ref_name }} xtractl_${{ github.ref_name }}_linux_amd64.tar.gz
6162 gh release upload ${{ github.ref_name }} xtractl_${{ github.ref_name }}_linux_arm64.tar.gz
63+ gh release upload ${{ github.ref_name }} xtractl_${{ github.ref_name }}_macos_arm64.tar.gz
6264
6365 docker :
6466 runs-on : ubuntu-latest
@@ -100,6 +102,7 @@ jobs:
100102 if : ${{ github.ref_type == 'branch' && github.ref_name == 'main' }}
101103 uses : docker/build-push-action@v6
102104 with :
105+ context : .
103106 push : true
104107 pull : true
105108 tags : |
@@ -112,6 +115,7 @@ jobs:
112115 if : ${{ github.ref_type == 'branch' && github.ref_name != 'main' }}
113116 uses : docker/build-push-action@v6
114117 with :
118+ context : .
115119 push : true
116120 pull : true
117121 tags : |
@@ -124,6 +128,7 @@ jobs:
124128 if : ${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'v') }}
125129 uses : docker/build-push-action@v6
126130 with :
131+ context : .
127132 push : true
128133 pull : true
129134 tags : |
0 commit comments