File tree Expand file tree Collapse file tree 2 files changed +37
-5
lines changed
Expand file tree Collapse file tree 2 files changed +37
-5
lines changed Original file line number Diff line number Diff line change @@ -78,14 +78,38 @@ jobs:
7878 name : guppy
7979 path : ./cli/dist/guppy
8080 retention-days : 1
81-
82- build_macos :
81+
82+ check_macos_cache :
8383 needs : [check_cli_cache, build_cli]
8484 if : always()
85+ runs-on : ubuntu-latest
86+ outputs :
87+ cache-hit : ${{ steps.cache.outputs.cache-hit }}
88+ steps :
89+ - name : Check CLI cache
90+ id : cache
91+ uses : actions/cache@v4
92+ with :
93+ path : ./macos/build
94+ key : macos-${{ hashFiles('macos/[!build]**', 'maco/**/[!build]**') }}
95+
96+ - name : Upload macOS app
97+ uses : actions/upload-artifact@v4
98+ with :
99+ name : guppy-${{ needs.check_cli_cache.outputs.version }}.pkg
100+ path : ./macos/build/guppy-${{ needs.check_cli_cache.outputs.version }}.pkg
101+ retention-days : 1
102+
103+ build_macos :
104+ needs : [check_cli_cache, build_cli, check_macos_cache]
105+ if : always() && needs.check_cli_cache.outputs.cache-hit != 'true'
85106 runs-on : macos-latest
86107 steps :
87108 - uses : actions/checkout@v4
88109
110+ - id : cachekey
111+ run : echo "cachekey=${{ hashFiles('macos/[!build]**', 'maco/**/[!build]**') }}" >> $GITHUB_OUTPUT
112+
89113 - name : Restore CLI from cache
90114 uses : actions/cache/restore@v4
91115 with :
@@ -163,6 +187,12 @@ jobs:
163187 --component ./macos/build/guppy.app /Applications \
164188 ./macos/build/guppy-${{ needs.check_cli_cache.outputs.version }}.pkg
165189
190+ - name : Save to cache
191+ uses : actions/cache/save@v4
192+ with :
193+ path : ./macos/build
194+ key : macos-${{ steps.cachekey.outputs.cachekey }}
195+
166196 - name : Upload macOS app
167197 uses : actions/upload-artifact@v4
168198 with :
Original file line number Diff line number Diff line change 6868 if : always() && !failure() && !cancelled()
6969 runs-on : ubuntu-latest
7070 steps :
71+ - uses : actions/checkout@v4
72+
7173 - name : Download CLI artifact
7274 uses : actions/download-artifact@v4
7375 with :
9092 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
9193 VERSION : ${{ needs.promote_to_release.outputs.version }}
9294 run : |
93- gh release create "$VERSION" \
94- --title "Guppy $VERSION" \
95+ gh release create "v $VERSION" \
96+ --title "Guppy v $VERSION" \
9597 --draft \
96- --notes "Release notes for $VERSION" \
98+ --notes "Release notes for v $VERSION" \
9799 "./cli/dist/guppy" \
98100 "./macos/build/guppy-$VERSION.pkg"
You can’t perform that action at this time.
0 commit comments