Skip to content

Publish Desktop Release to WinGet #33

Publish Desktop Release to WinGet

Publish Desktop Release to WinGet #33

name: Publish Desktop Release to WinGet
on:
workflow_dispatch:
release:
types: [released]
jobs:
publish:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include:
- id: "hrzlgnm.mdns-browser"
repo: "hrzlgnm/mdns-browser"
steps:
- name: Extract short version
id: extract_version
run: echo "SHORT_VERSION=${{ VERSION#*-v}}" >> $GITHUB_OUTPUT

Check failure on line 19 in .github/workflows/winget-publish-release.yml

View workflow run for this annotation

GitHub Actions / Publish Desktop Release to WinGet

Invalid workflow file

The workflow is not valid. .github/workflows/winget-publish-release.yml (Line: 19, Col: 14): Unexpected symbol: 'VERSION#*-v'. Located at position 1 within expression: VERSION#*-v
- name: Update Packages
uses: michidk/winget-updater@latest
with:
komac-version: "2.6.0"
komac-token: ${{ secrets.WINGET_TOKEN }}
identifier: ${{ matrix.id }}
repo: ${{ matrix.repo }}
url: https://github.com/${{ matrix.repo }}/releases/download/{VERSION}/mdns-browser_${{ steps.extract_version.outputs.SHORT_VERSION }}_x64-setup.exe
cleanup:
name: Cleanup branches
needs: publish # Not necessarily needed as PRs don't get closed that quick but still nice to have it in order
runs-on: ubuntu-24.04
steps:
- name: Run Komac
uses: michidk/run-komac@latest
with:
komac-version: "2.6.0"
args: "cleanup --only-merged --token=${{ secrets.WINGET_TOKEN }}"