-
-
Notifications
You must be signed in to change notification settings - Fork 465
41 lines (37 loc) · 1.63 KB
/
Copy pathwinget.yml
File metadata and controls
41 lines (37 loc) · 1.63 KB
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
35
36
37
38
39
40
41
name: Update Winget manifests
on:
release:
types: [published]
workflow_dispatch:
inputs:
winget_replace_version:
description: Optional previous catalog version to replace when submitting a newer version (must differ from the version in release/version). Leave empty for normal releases and same-version resubmits.
required: false
default: ''
jobs:
winget:
if: github.repository == 'pyrevitlabs/pyRevit'
runs-on: windows-2025
steps:
- name: Checkout Repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
- name: Install WingetCreate
shell: pwsh
run: |
$ErrorActionPreference = 'Stop'
$wingetCreate = Join-Path $env:RUNNER_TEMP 'wingetcreate.exe'
Invoke-WebRequest -Uri 'https://aka.ms/wingetcreate/latest' -OutFile $wingetCreate
$signature = Get-AuthenticodeSignature -FilePath $wingetCreate
if ($signature.Status -ne 'Valid') { throw "Downloaded wingetcreate.exe has invalid Authenticode signature: $($signature.Status)" }
"WINGET_CREATE_EXE=$wingetCreate" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Update WinGet manifests
working-directory: build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Publish__WingetToken: ${{ secrets.WINGET_GITHUB_TOKEN }}
Publish__SubmitWinget: true
Publish__WingetCreateExe: ${{ env.WINGET_CREATE_EXE }}
Publish__WingetReplaceVersion: ${{ inputs.winget_replace_version }}
run: dotnet run -c Release -- winget