Skip to content

Commit ace88e3

Browse files
authored
asset test
1 parent 77d3cea commit ace88e3

1 file changed

Lines changed: 10 additions & 20 deletions

File tree

.github/workflows/winget.yml

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,32 @@ name: Update Winget Package
22

33
on:
44
workflow_dispatch: # allows manual triggering
5-
schedule:
6-
- cron: '28 5 * * *' # Update every day at 5:28 UTC
75

86
jobs:
97
update:
108
name: Update Winget Package
119
runs-on: ubuntu-latest
12-
if: github.repository_owner == 'ggml-org'
1310

1411
steps:
15-
- name: Install cargo binstall
16-
uses: cargo-bins/cargo-binstall@268643a6b5ea099f5718ee5cd3ff7dc89a5eb49b
17-
18-
- name: Install komac
19-
run: |
20-
cargo binstall komac@2.11.2 -y
21-
2212
- name: Find latest release
2313
id: find_latest_release
24-
uses: actions/github-script@v6
14+
uses: actions/github-script@v8
2515
with:
16+
result-encoding: json
2617
script: |
2718
const { data: releases } = await github.rest.repos.listReleases({
2819
owner: context.repo.owner,
2920
repo: context.repo.repo,
3021
});
31-
console.log("Latest release:", releases[0].tag_name);
32-
return releases[0].tag_name;
22+
const { tag_name: version, assets: assets } = releases.find(({assets}) => assets.find(asset => asset.name.includes('win-vulkan')));
23+
const { browser_download_url: asset_url } = assets.find(asset => asset.name.includes('win-vulkan'));
24+
console.log("Latest release:", version);
25+
return {
26+
version: version,
27+
asset_url: asset_url
28+
};
3329
3430
- name: Update manifest
35-
env:
36-
VERSION: ${{ steps.find_latest_release.outputs.result }}
3731
run: |
3832
echo "Updating manifest..."
39-
komac update --version ${{ env.VERSION }} \
40-
--urls "https://github.com/ggml-org/llama.cpp/releases/download/${{ env.VERSION }}/llama-${{ env.VERSION }}-bin-win-vulkan-x64.zip" \
41-
--token ${{ secrets.WINGET_GITHUB_TOKEN }} \
42-
--submit \
43-
ggml.llamacpp
33+
echo "version ${{ steps.find_latest_release.outputs.version }} url ${{ steps.find_latest_release.outputs.asset_url }}"

0 commit comments

Comments
 (0)