Skip to content

Commit 095693a

Browse files
committed
use the build-logic and main-build-artifacts caches for snapshots
GitHub Actions caches have scopes. For any given pull request, it can download its own caches and it can download the caches associated with the `main` branch. Once that PR branch is merged, its cache is useless. By using and writing to these two caches on the `main` branch, we speed up the `publish` builds but we also keep the caches as up-to-date as possible. In turn, that means more build cache hits and faster builds for all pull requests.
1 parent 9e2f3b0 commit 095693a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.github/workflows/publish-snapshot.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@ jobs:
2323
uses : ./.github/actions/gradle-task
2424
with :
2525
task : checkVersionIsSnapshot
26+
write-cache-key : build-logic
2627

2728
- name : Assemble
2829
uses : ./.github/actions/gradle-task
2930
with :
3031
task : assemble
32+
write-cache-key : main-build-artifacts
3133

3234
- name : Check
3335
uses : ./.github/actions/gradle-task

0 commit comments

Comments
 (0)