diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d6db84b..0b4f025 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -105,7 +105,7 @@ jobs: retention-days: 10 publish-release: - name: Publish release + name: Publish GitHub release needs: - build-binaries - package-godot-addon @@ -134,3 +134,29 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} shell: bash + + winget: + name: Publish to WinGet + runs-on: windows-latest + needs: publish-release + permissions: + contents: read + pull-requests: write + steps: + - name: Setup WingetCreate + run: curl.exe -L https://aka.ms/wingetcreate/latest -o wingetcreate.exe + shell: pwsh + + - name: Publish to WinGet + run: | + $version = "${{ github.ref_name }}" + + $urls = @( + "https://github.com/GDQuest/GDScript-formatter/releases/download/$version/gdscript-formatter-$version-windows-x86_64.exe.zip|x64", + "https://github.com/GDQuest/GDScript-formatter/releases/download/$version/gdscript-formatter-$version-windows-aarch64.exe.zip|arm64" + ) + + .\wingetcreate.exe update GDQuest.GDScript.Formatter --version $version --urls $urls --submit + env: + WINGET_CREATE_GITHUB_TOKEN: ${{ secrets.WINGET_PAT }} + shell: pwsh \ No newline at end of file