|
17 | 17 | matrix:
|
18 | 18 | target:
|
19 | 19 | - "linux:arm64:"
|
20 |
| - # - "linux:arm:" |
| 20 | + - "linux:arm:" |
21 | 21 | - "linux:amd64:"
|
22 | 22 | - "darwin:arm64:"
|
23 | 23 | - "darwin:amd64:"
|
@@ -69,19 +69,34 @@ jobs:
|
69 | 69 | export GOARCH="$(echo ${{ matrix.target }} | cut -d':' -f2)"
|
70 | 70 | export EXT="$(echo ${{ matrix.target }} | cut -d':' -f3)"
|
71 | 71 |
|
72 |
| - go build \ |
73 |
| - -trimpath \ |
74 |
| - -buildmode=pie \ |
75 |
| - -mod=readonly \ |
76 |
| - -modcacherw \ |
77 |
| - -o ${{ secrets.APP_NAME }}.${GOOS}.${GOARCH} \ |
78 |
| - -ldflags "\ |
79 |
| - -X ${{ github.repository }}/version.APPNAME=${{ secrets.APP_NAME }} \ |
80 |
| - -X ${{ github.repository }}/version.VERSION=${{ steps.prep.outputs.version }} \ |
81 |
| - -X ${{ github.repository }}/version.GOVERSION=${{ steps.prep.outputs.go-version }} \ |
82 |
| - -X ${{ github.repository }}/version.BUILDTIME=${{ steps.prep.outputs.buildtime }} \ |
83 |
| - -X ${{ github.repository }}/version.COMMITHASH=${{ github.sha }} \ |
84 |
| - -s -w" |
| 72 | + if [ $GOARCH = arm ]; then |
| 73 | + go build \ |
| 74 | + -trimpath \ |
| 75 | + -mod=readonly \ |
| 76 | + -modcacherw \ |
| 77 | + -o ${{ secrets.APP_NAME }}.${GOOS}.${GOARCH} \ |
| 78 | + -ldflags "\ |
| 79 | + -X ${{ github.repository }}/version.APPNAME=${{ secrets.APP_NAME }} \ |
| 80 | + -X ${{ github.repository }}/version.VERSION=${{ steps.prep.outputs.version }} \ |
| 81 | + -X ${{ github.repository }}/version.GOVERSION=${{ steps.prep.outputs.go-version }} \ |
| 82 | + -X ${{ github.repository }}/version.BUILDTIME=${{ steps.prep.outputs.buildtime }} \ |
| 83 | + -X ${{ github.repository }}/version.COMMITHASH=${{ github.sha }} \ |
| 84 | + -s -w" |
| 85 | + else |
| 86 | + go build \ |
| 87 | + -trimpath \ |
| 88 | + -buildmode=pie \ |
| 89 | + -mod=readonly \ |
| 90 | + -modcacherw \ |
| 91 | + -o ${{ secrets.APP_NAME }}.${GOOS}.${GOARCH} \ |
| 92 | + -ldflags "\ |
| 93 | + -X ${{ github.repository }}/version.APPNAME=${{ secrets.APP_NAME }} \ |
| 94 | + -X ${{ github.repository }}/version.VERSION=${{ steps.prep.outputs.version }} \ |
| 95 | + -X ${{ github.repository }}/version.GOVERSION=${{ steps.prep.outputs.go-version }} \ |
| 96 | + -X ${{ github.repository }}/version.BUILDTIME=${{ steps.prep.outputs.buildtime }} \ |
| 97 | + -X ${{ github.repository }}/version.COMMITHASH=${{ github.sha }} \ |
| 98 | + -s -w" |
| 99 | + fi |
85 | 100 |
|
86 | 101 | if [ ! -z "${EXT}" ]; then
|
87 | 102 | mv ${{ secrets.APP_NAME }}.${GOOS}.${GOARCH} ${{ secrets.APP_NAME }}${EXT}
|
|
0 commit comments