-
Notifications
You must be signed in to change notification settings - Fork 8
34 lines (28 loc) · 1.06 KB
/
winget.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Publish to Winget
on:
release:
types: [released]
workflow_dispatch:
inputs:
package_version:
description: 'The version number of the package'
required: true
default: ''
type: string
defaults:
run:
shell: |
pwsh -noninteractive -command "try {{ $ErrorActionPreference='Stop'; . '{0}' }} catch {{ Write-Error ""FAILED: $_""; throw; }} if ((Test-Path -LiteralPath variable:\LASTEXITCODE)) {{ exit $LASTEXITCODE }}"
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Print Package Version
run: |
Write-Host "Using Package Version ${{ github.event.release.tag_name || github.event.inputs.package_version }}"
- uses: vedantmgoyal2009/winget-releaser@v2
with:
identifier: radj307.volume-control
version: ${{ github.event.release.tag_name || github.event.inputs.package_version }}
installers-regex: '-Installer\.exe$'
token: ${{ secrets.WINGET_TOKEN }}