Skip to content

Commit bbce9df

Browse files
authored
Enable LFS (#47)
* Enable LFS * Add optional LFS variable * Updated README to include use_git_lfs release option * Added GitHub documentation quota links and warnings
1 parent 68e3d4d commit bbce9df

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

.github/workflows/release.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ env:
1111
add_binaries_to_github_release: true
1212
#itch_target: <itch.io-username>/<game-name>
1313

14+
# Before enabling LFS, please take a look at GitHub's documentation for costs and quota limits:
15+
# https://docs.github.com/en/repositories/working-with-files/managing-large-files/about-storage-and-bandwidth-usage
16+
use_git_lfs: false
17+
1418

1519
jobs:
1620

@@ -22,6 +26,8 @@ jobs:
2226
- uses: olegtarasov/[email protected]
2327
id: get_version
2428
- uses: actions/checkout@v4
29+
with:
30+
lfs: ${{ env.use_git_lfs }}
2531
- uses: dtolnay/rust-toolchain@stable
2632
with:
2733
targets: wasm32-unknown-unknown
@@ -68,6 +74,8 @@ jobs:
6874
- uses: olegtarasov/[email protected]
6975
id: get_version
7076
- uses: actions/checkout@v4
77+
with:
78+
lfs: ${{ env.use_git_lfs }}
7179
- uses: dtolnay/rust-toolchain@stable
7280
with:
7381
targets: x86_64-unknown-linux-gnu
@@ -115,6 +123,8 @@ jobs:
115123
- uses: olegtarasov/[email protected]
116124
id: get_version
117125
- uses: actions/checkout@v4
126+
with:
127+
lfs: ${{ env.use_git_lfs }}
118128
- uses: dtolnay/rust-toolchain@stable
119129
with:
120130
targets: x86_64-pc-windows-msvc
@@ -158,6 +168,8 @@ jobs:
158168
- uses: olegtarasov/[email protected]
159169
id: get_version
160170
- uses: actions/checkout@v4
171+
with:
172+
lfs: ${{ env.use_git_lfs }}
161173
- uses: dtolnay/rust-toolchain@stable
162174
with:
163175
targets: x86_64-apple-darwin
@@ -202,6 +214,8 @@ jobs:
202214
- uses: olegtarasov/[email protected]
203215
id: get_version
204216
- uses: actions/checkout@v4
217+
with:
218+
lfs: ${{ env.use_git_lfs }}
205219
- uses: dtolnay/rust-toolchain@stable
206220
with:
207221
targets: aarch64-apple-darwin

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ If you don't want to target some of those platforms, you can remove the correspo
3636

3737
If you don't want to attach the builds to the GitHub release, set `env.add_binaries_to_github_release` to `false`.
3838

39+
If you are using Git LFS, set `env.use_git_lfs` to `true` so your assets are properly checked out.
40+
41+
> [!Warning]
42+
> GitHub's LFS storage has a quota. Please take a look at GitHub's documentation [here](https://docs.github.com/en/repositories/working-with-files/managing-large-files/about-storage-and-bandwidth-usage) to understand the quota and costs before enabling this option.
43+
3944
### Git Tag from GitHub UI
4045

4146
You can follow [Managing releases in a repository](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository)

0 commit comments

Comments
 (0)