Skip to content

Commit f11a085

Browse files
committed
automatically resolve latest download url
1 parent f4d3e09 commit f11a085

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

docs/index.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ <h1 class="display-4 fw-bold">New World Buddy</h1>
2424
Includes database browser, crafting calculator, items and progress tracking utilities.
2525
</p>
2626
<div class="d-grid gap-2 d-sm-flex justify-content-sm-center mb-5">
27-
<a class="btn btn-success btn-lg px-4 me-sm-3" href="https://github.com/giniedp/nw-buddy/releases/download/v1.7.0-1/nw-buddy.1.7.0-1.exe" target="_blank">
27+
<a id="download-link" class="btn btn-success btn-lg px-4 me-sm-3" href="https://github.com/giniedp/nw-buddy/releases/latest" target="_blank">
2828
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-windows" viewBox="0 0 16 16">
2929
<path d="M6.555 1.375 0 2.237v5.45h6.555V1.375zM0 13.795l6.555.933V8.313H0v5.482zm7.278-5.4.026 6.378L16 16V8.395H7.278zM16 0 7.33 1.244v6.414H16V0z"/>
3030
</svg>
@@ -53,4 +53,9 @@ <h1 class="display-4 fw-bold">New World Buddy</h1>
5353
</a>
5454
</div>
5555
</body>
56+
<script>
57+
fetch('https://api.github.com/repos/giniedp/nw-buddy/releases/latest')
58+
.then((response) => response.json())
59+
.then((data) => document.querySelector('#download-link').href = data.assets[0].browser_download_url)
60+
</script>
5661
</html>

0 commit comments

Comments
 (0)