Skip to content

Commit

Permalink
Cache project source.
Browse files Browse the repository at this point in the history
  • Loading branch information
jshbrntt committed Sep 18, 2024
1 parent 274579e commit 558d65a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ jobs:
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Cache project source
id: cache-project-source
uses: actions/cache@v4
with:
restore-keys: source-
key: source-${{ steps.commit.outputs.short_hash }}
path: |
.
!.git
- name: Checkout latest project source
uses: actions/checkout@v4
with:
Expand All @@ -23,7 +33,7 @@ jobs:
run: |
name="${GITHUB_REPOSITORY#*/}"
version="$(sed -n "s/^project($name VERSION \([0-9.]*\)).*/\1/p" CMakeLists.txt)"
echo "release=$name-rc.$short_hash" >> "$GITHUB_OUTPUT"
echo "release=$version-rc.${{ steps.commit.outputs.short_hash }}" >> "$GITHUB_OUTPUT"
- name: Create release
id: create_release
Expand Down

0 comments on commit 558d65a

Please sign in to comment.