ci: include winget manifest in releases

This commit is contained in:
objz committed 2026-04-27 14:52:01 +02:00
1 parent de6af2de18
commit f226358b1c
2 files changed
+17 -2

No files matched your search

+13 -1
View File
@@ -8,7 +8,7 @@ on:
type: string
permissions:
contents: read
contents: write
jobs:
publish:
@@ -26,6 +26,7 @@ jobs:
$version = $plan.releases[0].app_version
$identifier = 'Objz.MclLauncher'
$packagePath = "manifests/o/Objz/MclLauncher/$version"
$assetPath = "winget-manifest-$version.zip"
$installerFile = 'mcl-launcher-x86_64-pc-windows-msvc.msi'
$checksumFile = "$installerFile.sha256"
$installerUrl = "https://github.com/objz/mcl/releases/download/$tag/$installerFile"
@@ -94,8 +95,19 @@ jobs:
$localeManifest | Set-Content -Path "$packagePath/$identifier.locale.en-US.yaml" -Encoding utf8
Remove-Item "$packagePath/$checksumFile"
Compress-Archive -Path manifests -DestinationPath $assetPath -Force
"path=$packagePath" >> $env:GITHUB_OUTPUT
"asset=$assetPath" >> $env:GITHUB_OUTPUT
- name: upload WinGet manifest to GitHub Release
shell: pwsh
env:
GH_TOKEN: ${{ github.token }}
PLAN: ${{ inputs.plan }}
run: |
$plan = $env:PLAN | ConvertFrom-Json
gh release upload "$($plan.announcement_tag)" "${{ steps.manifest.outputs.asset }}" --clobber
- name: submit WinGet manifest
shell: pwsh
+4 -1
View File
@@ -288,6 +288,7 @@ jobs:
RELEASE_COMMIT: "${{ github.sha }}"
CHANGELOG: "${{ steps.changelog.outputs.content }}"
RELEASE_TAG: "${{ needs.plan.outputs.tag }}"
APP_VERSION: "${{ fromJson(steps.host.outputs.manifest).releases[0].app_version }}"
run: |
echo "$CHANGELOG" > $RUNNER_TEMP/notes.txt
cat >> $RUNNER_TEMP/notes.txt <<EOF
@@ -321,6 +322,8 @@ jobs:
winget install Objz.MclLauncher
\`\`\`
The generated WinGet manifest is attached as \`winget-manifest-${APP_VERSION}.zip\` for local validation.
## Chocolatey
\`\`\`
@@ -431,7 +434,7 @@ jobs:
secrets: inherit
# publish jobs get escalated permissions
permissions:
"contents": "read"
"contents": "write"
custom-publish-chocolatey:
needs: