Skip to content

Commit 3afdea2

Browse files
committed
properly cache build according to changes
1 parent bfae264 commit 3afdea2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/build.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
inputs:
77
use-build-cache:
88
type: boolean
9-
default: 'false'
9+
default: 'true'
1010
description: Use previous cached build (if it exists)
1111

1212

@@ -78,7 +78,7 @@ jobs:
7878
uses: actions/cache@v2
7979
with:
8080
path: '${{ github.workspace }}/build/'
81-
key: ${{ runner.os }}-BuildCache
81+
key: ${{ runner.os }}-BuildCache-${{ hashFiles('common/**', 'cpptoxml/**', 'generator/**', 'modules/**', 'CMakeLists.txt') }}
8282

8383
- name: Run cmake and build
8484
if: ${{ steps.cache-build.outputs.cache-hit != 'true' || inputs.use-build-cache != 'true' }}
@@ -119,7 +119,7 @@ jobs:
119119
id: vars
120120
shell: bash
121121
run: |
122-
echo "::set-output name=date::$(date +'%Y-%m-%d.%H:%M')"
122+
echo "::set-output name=date::$(date +'%Y.%m.%d')"
123123
echo "::set-output name=commit_hash::$(git rev-parse HEAD)"
124124
echo "::set-output name=commit_hash_short::$(git rev-parse --short HEAD)"
125125
@@ -135,7 +135,7 @@ jobs:
135135
uses: ncipollo/release-action@v1
136136
with:
137137
artifacts: 'lqt-${{ steps.vars.outputs.commit_hash_short }}-${{ runner.os }}-${{ runner.arch }}.zip'
138-
tag: Build.${{ steps.vars.outputs.date }}
138+
tag: v1-${{ steps.vars.outputs.date }}
139139
commit: ${{ steps.vars.outputs.commit_hash }}
140140
body: Release for Windows x64, packaged with Qt dependencies.
141141

0 commit comments

Comments
 (0)