Skip to content

Commit 5d1d2ff

Browse files
committed
ci: rename choco workflow and add WinGet publish workflow
- Rename Chocolatey workflow to "Publish Chocolatey Package" - Rename job from `build-choco` to `publish` for consistency - Add new WinGet publish workflow triggered on release or manual dispatch
1 parent 9e3dcc4 commit 5d1d2ff

2 files changed

Lines changed: 39 additions & 2 deletions

File tree

.github/workflows/choco-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build and Publish Chocolatey Package
1+
name: Publish Chocolatey Package
22

33
on:
44
release:
@@ -11,7 +11,7 @@ on:
1111
required: true
1212

1313
jobs:
14-
build-choco:
14+
publish:
1515
runs-on: windows-latest
1616

1717
# Grant minimal read-only access to repository contents
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Publish to WinGet
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
inputs:
8+
tag:
9+
description: "Tag to publish to WinGet (e.g., v1.0.0)"
10+
required: true
11+
12+
jobs:
13+
publish:
14+
runs-on: windows-latest
15+
16+
permissions:
17+
contents: read
18+
19+
steps:
20+
- name: Determine version
21+
id: meta
22+
shell: pwsh
23+
run: |
24+
$tag = if ("${{ github.event_name }}" -eq "workflow_dispatch") {
25+
"${{ github.event.inputs.tag }}"
26+
} else {
27+
"${{ github.event.release.tag_name }}"
28+
}
29+
30+
echo "version=$($tag.TrimStart('v'))" >> $env:GITHUB_OUTPUT
31+
32+
- name: Publish to WinGet
33+
uses: vedantmgoyal9/winget-releaser@main
34+
with:
35+
identifier: JayPrall.ColorCop
36+
version: ${{ steps.meta.outputs.version }}
37+
token: ${{ secrets.WINGET_TOKEN }}

0 commit comments

Comments
 (0)