20
20
DOCKER_CLI_EXPERIMENTAL : " enabled"
21
21
flags : " "
22
22
steps :
23
- - if : ${{ github.event_name == 'workflow_dispatch' }}
24
- shell : bash
25
- run : echo "flags=--nightly" >> $GITHUB_ENV
26
- - if : matrix.os == 'ubuntu-latest'
27
- shell : bash
28
- run : echo "goos=linux" >> $GITHUB_ENV
29
- - if : matrix.os == 'macos-latest'
30
- shell : bash
31
- run : echo "goos=darwin" >> $GITHUB_ENV
32
- - if : matrix.os == 'windows-latest'
33
- shell : bash
34
- run : echo "goos=windows" >> $GITHUB_ENV
35
23
- uses : actions/checkout@v3
36
24
with :
37
25
fetch-depth : 0
@@ -53,13 +41,25 @@ jobs:
53
41
- shell : bash
54
42
run : |
55
43
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
56
- - id : cache
57
- uses : actions/cache@v3
44
+ - uses : actions/ cache@v3
45
+ if : matrix.os == 'ubuntu-latest'
58
46
with :
59
- path : dist/${{ env.goos }}
60
- key : ${{ env.goos }}-${{ env.sha_short }}
47
+ path : dist/linux
48
+ key : linux-${{ env.sha_short }}
49
+ - uses : actions/cache@v3
50
+ if : matrix.os == 'macos-latest'
51
+ with :
52
+ path : dist/darwin
53
+ key : darwin-${{ env.sha_short }}
54
+ - uses : actions/cache@v3
55
+ if : matrix.os == 'windows-latest'
56
+ with :
57
+ path : dist\windows
58
+ key : windows-${{ env.sha_short }}
59
+ - if : ${{ github.event_name == 'workflow_dispatch' }}
60
+ shell : bash
61
+ run : echo "flags=--nightly" >> $GITHUB_ENV
61
62
- uses : goreleaser/goreleaser-action@v4
62
- if : steps.cache.outputs.cache-hit != 'true' # do not run if cache hit
63
63
with :
64
64
distribution : goreleaser-pro
65
65
version : latest
0 commit comments