-
Notifications
You must be signed in to change notification settings - Fork 32
33 lines (29 loc) · 1.02 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
name: Publish to WinGet
permissions:
contents: read
on:
workflow_dispatch: # Manually run the action
jobs:
msix-to-winget:
name: Publish to WinGet
runs-on: windows-latest
steps:
- name: Get Latest Release
id: get-version
uses: actions/github-script@v7
with:
script: |-
const { owner, repo } = context.repo;
const latestRelease = await github.rest.repos.getLatestRelease({ owner, repo });
const tag = latestRelease.data.tag_name;
const version = tag.replace("v", "");
core.setOutput('version', version);
core.setOutput('release-tag', tag);
console.log("Release tag: ", tag, " Version: ", version);
- uses: vedantmgoyal9/winget-releaser@v2
with:
identifier: AmN.yasb
version: ${{ steps.get-version.outputs.version }}
release-tag: ${{ steps.get-version.outputs.release-tag }}
installers-regex: '\.msi$'
token: ${{ secrets.WINGET_TOKEN }}