MFCMAPI December 2024 (24.0.24362.01) #12
Workflow file for this run
This file contains 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
# Publishes the latest MFCMAPI release to the Windows Package Manager (Winget) | |
# https://github.com/microsoft/winget-create?tab=readme-ov-file | |
name: Update Winget $(Year:yy).0.$(date:yy)$(DayOfYear)$(rev:.rr) | |
on: | |
workflow_dispatch: | |
release: | |
types: [published] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 | |
with: | |
egress-policy: audit | |
- name: '📫🚀 Publish Latest MFCMAPI Release to Winget' | |
run: | | |
$wingetPackage = "Microsoft.MFCMAPI" | |
$gitToken = "${{ secrets.MFCMAPI_WINGET }}" | |
$github = Invoke-RestMethod -uri "https://api.github.com/repos/Microsoft/MFCMAPI/releases" | |
$targetRelease = $github | Where-Object { -not $_.draft -and -not $_.prerelease }| Select -First 1 | |
$ver = $targetRelease.tag_name -ireplace '^v' | |
# Write-Host $targetRelease | |
# Write-Host $ver | |
$installerUserX86Url = $targetRelease | Select -ExpandProperty assets -First 1 | Where-Object -Property name -match 'MFCMAPI.exe' | Select -ExpandProperty browser_download_url | |
$installerUserX64Url = $targetRelease | Select -ExpandProperty assets -First 1 | Where-Object -Property name -match 'MFCMAPI.x64.exe' | Select -ExpandProperty browser_download_url | |
# getting latest wingetcreate file | |
iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe | |
.\wingetcreate.exe update $wingetPackage -s -v $ver -u "$installerUserX86Url|user" "$installerUserX64Url|user" -t $gitToken | |
shell: pwsh |