Skip to content

Commit bf36219

Browse files
committed
ci: add WinGet publishing for releases (#239)
1 parent 997cc2c commit bf36219

1 file changed

Lines changed: 26 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ jobs:
105105
retention-days: 10
106106

107107
publish-release:
108-
name: Publish release
108+
name: Publish GitHub release
109109
needs:
110110
- build-binaries
111111
- package-godot-addon
@@ -134,3 +134,28 @@ jobs:
134134
env:
135135
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
136136
shell: bash
137+
138+
winget:
139+
name: Publish to WinGet
140+
runs-on: windows-latest
141+
needs: publish-release
142+
permissions:
143+
contents: read
144+
pull-requests: write
145+
steps:
146+
- name: Setup WingetCreate
147+
run: curl.exe -L https://aka.ms/wingetcreate/latest -o wingetcreate.exe
148+
149+
- name: Publish to WinGet
150+
run: |
151+
$version = "${{ github.ref_name }}"
152+
153+
$urls = @(
154+
"https://github.com/GDQuest/GDScript-formatter/releases/download/$version/gdscript-formatter-$version-windows-x86_64.exe.zip|x64",
155+
"https://github.com/GDQuest/GDScript-formatter/releases/download/$version/gdscript-formatter-$version-windows-aarch64.exe.zip|arm64"
156+
)
157+
158+
.\wingetcreate.exe update GDQuest.GDScript.Formatter --version $version --urls $urls --submit
159+
env:
160+
WINGET_CREATE_GITHUB_TOKEN: ${{ secrets.WINGET_PAT }}
161+
shell: pwsh

0 commit comments

Comments
 (0)