Publish to WinGet #12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish to WinGet | |
| # Auto-submits each new Endstate release to microsoft/winget-pkgs so | |
| # `winget install SubstrateSystems.Endstate` stays current. Fires only on | |
| # full (non-prerelease) releases; workflow_dispatch allows re-submitting a | |
| # specific version if a run fails. | |
| on: | |
| release: | |
| types: [released] | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: "Version to publish (e.g. 2.19.0); the gui-v<version> release must exist" | |
| required: true | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Derive version from tag or input | |
| id: version | |
| # Release tags look like "gui-v2.18.0" -> winget wants "2.18.0" | |
| run: | | |
| if [ -n "${{ github.event.inputs.version }}" ]; then | |
| echo "value=${{ github.event.inputs.version }}" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "value=${GITHUB_REF_NAME#gui-v}" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Publish to WinGet | |
| uses: vedantmgoyal9/winget-releaser@v2 | |
| with: | |
| identifier: SubstrateSystems.Endstate | |
| version: ${{ steps.version.outputs.value }} | |
| release-tag: gui-v${{ steps.version.outputs.value }} | |
| # Submit the MSI installer (matches the existing manifest) | |
| installers-regex: '\.msi$' | |
| token: ${{ secrets.WINGET_TOKEN }} |