Skip to content

Commit

Permalink
Setup build caches when releasing
Browse files Browse the repository at this point in the history
  • Loading branch information
majori committed Nov 8, 2023
1 parent f09f0e0 commit be76dcd
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ jobs:
with:
go-version: "1.21"

- name: Setup Golang caches
uses: actions/cache@v3
- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ jobs:

- run: git fetch --force --tags

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand All @@ -30,8 +29,16 @@ jobs:
with:
go-version: "1.21"

- name: Release binaries
uses: goreleaser/goreleaser-action@v4
- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-golang-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-golang-
- uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,13 @@ jobs:
name: Run tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/checkout@v3

- uses: actions/setup-go@v3
with:
go-version: "1.21"

- name: Setup Golang caches
uses: actions/cache@v3
- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
Expand Down

0 comments on commit be76dcd

Please sign in to comment.