|
47 | 47 | steps:
|
48 | 48 | - name: Checkout Repository
|
49 | 49 | uses: actions/checkout@v2
|
| 50 | + with: |
| 51 | + fetch-depth: 0 |
| 52 | + - name: Determine Go version from go.mod |
| 53 | + run: echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2)" >> $GITHUB_ENV |
| 54 | + - name: Setup QEMU |
| 55 | + uses: docker/setup-qemu-action@v1 |
| 56 | + with: |
| 57 | + platforms: arm,arm64,ppc64le,s390x,mips64le,386 |
50 | 58 | - name: Docker Buildx
|
51 | 59 | uses: docker/setup-buildx-action@v1
|
52 | 60 | with:
|
|
60 | 68 | ${{ runner.os }}-buildx-
|
61 | 69 | - name: Determine GOPATH
|
62 | 70 | run: echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
|
| 71 | + - name: Setup Golang Environment |
| 72 | + uses: actions/setup-go@v2 |
| 73 | + with: |
| 74 | + go-version: ${{ env.GO_VERSION }} |
63 | 75 | - name: Run GoReleaser
|
64 | 76 | uses: goreleaser/goreleaser-action@v2
|
65 | 77 | with:
|
@@ -91,9 +103,21 @@ jobs:
|
91 | 103 | steps:
|
92 | 104 | - name: Checkout Repository
|
93 | 105 | uses: actions/checkout@v2
|
| 106 | + with: |
| 107 | + fetch-depth: 0 |
94 | 108 | - name: Retrieve Tag
|
95 | 109 | id: get_version
|
96 | 110 | run: echo ::set-output name=GIT_TAG::$(echo ${GITHUB_REF/refs\/tags\//} | tr -d v)
|
| 111 | + - name: Determine Go version from go.mod |
| 112 | + run: echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2)" >> $GITHUB_ENV |
| 113 | + - name: Setup Golang Environment |
| 114 | + uses: actions/setup-go@v2 |
| 115 | + with: |
| 116 | + go-version: ${{ env.GO_VERSION }} |
| 117 | + - name: Setup QEMU |
| 118 | + uses: docker/setup-qemu-action@v1 |
| 119 | + with: |
| 120 | + platforms: arm,arm64,ppc64le,s390x,mips64le,386 |
97 | 121 | - name: Docker Buildx
|
98 | 122 | uses: docker/setup-buildx-action@v1
|
99 | 123 | with:
|
|
0 commit comments