Skip to content

Commit fee45cd

Browse files
authored
Create example workflow
1 parent af6e763 commit fee45cd

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/example.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Winget badge update
2+
3+
on:
4+
# release:
5+
# types: [published]
6+
workflow_dispatch:
7+
8+
jobs:
9+
update-badge:
10+
name: Update latest version
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Winget Version Badge
17+
uses: gnpaone/winget-badge@latest
18+
with:
19+
id: "GitHub.cli,Git.Git"
20+
marker_text: "EXAMPLE_1,EXAMPLE_2"
21+
pkg_link: "https://github.com,"
22+
style: "plastic"
23+
label_color: ",red"
24+
color: "blue,green"
25+
id: latestver
26+
27+
# Optional
28+
- name: Version
29+
run: |
30+
version=${{ steps.latestver.outputs.winget_ver }}
31+
echo "ver=$version" >> $GITHUB_OUTPUT
32+
IFS=',' read -r -a array <<< "$version"
33+
for i in "${!array[@]}"; do
34+
echo "ver$i=${array[$i]}" >> $GITHUB_OUTPUT
35+
done
36+

0 commit comments

Comments
 (0)