Browse Source

Merge pull request #939 from external-secrets/chore/update-crane

adding setup go to release CI
paul-the-alien[bot] 4 years ago
parent
commit
05b0e37be3
1 changed files with 25 additions and 0 deletions
  1. 25 0
      .github/workflows/release.yml

+ 25 - 0
.github/workflows/release.yml

@@ -80,6 +80,31 @@ jobs:
         with:
         with:
           fetch-depth: 0
           fetch-depth: 0
 
 
+      - name: Setup Go
+        uses: actions/setup-go@v2
+        with:
+          go-version: ${{ env.GO_VERSION }}
+
+      - name: Find the Go Cache
+        id: go
+        run: |
+          echo "::set-output name=build-cache::$(go env GOCACHE)"
+          echo "::set-output name=mod-cache::$(go env GOMODCACHE)"
+
+      - name: Cache the Go Build Cache
+        uses: actions/cache@v3
+        with:
+          path: ${{ steps.go.outputs.build-cache }}
+          key: ${{ runner.os }}-build-publish-artifacts-${{ hashFiles('**/go.sum') }}
+          restore-keys: ${{ runner.os }}-build-publish-artifacts-
+
+      - name: Cache Go Dependencies
+        uses: actions/cache@v3
+        with:
+          path: ${{ steps.go.outputs.mod-cache }}
+          key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}
+          restore-keys: ${{ runner.os }}-pkg-
+
       - name: Login to Docker
       - name: Login to Docker
         uses: docker/login-action@v1
         uses: docker/login-action@v1
         if: env.GHCR_USERNAME != ''
         if: env.GHCR_USERNAME != ''