Skip to content

Commit

Permalink
add caching for goreleaser bin
Browse files Browse the repository at this point in the history
  • Loading branch information
strowk committed Dec 1, 2024
1 parent f2162d4 commit 1b64bdc
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/cache-goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Cache goreleaser

# This workflow exists only to create cache for goreleaser binary
# so that it can be used in the release workflow, that runs on tags
# and cannot reuse caches from other runs except for the same tag or default branch

on:
workflow_dispatch:
push:
branches:
- main

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23.3'

- name: Cache installed binaries
uses: actions/cache@v4
with:
path: /home/runner/go/bin
key: ${{ runner.os }}-goreleaser

- name: Install goreleaser
run: |
go install github.com/goreleaser/goreleaser/v2@latest
which goreleaser

0 comments on commit 1b64bdc

Please sign in to comment.