f098fb4cdc
Bumps the actions group with 4 updates: [actions/upload-artifact](https://github.com/actions/upload-artifact), [actions/github-script](https://github.com/actions/github-script), [nick-fields/retry](https://github.com/nick-fields/retry) and [softprops/action-gh-release](https://github.com/softprops/action-gh-release). Updates `actions/upload-artifact` from 6 to 7 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v6...v7) Updates `actions/github-script` from 7 to 9 - [Release notes](https://github.com/actions/github-script/releases) - [Commits](https://github.com/actions/github-script/compare/v7...v9) Updates `nick-fields/retry` from 3.0.2 to 4.0.0 - [Release notes](https://github.com/nick-fields/retry/releases) - [Commits](https://github.com/nick-fields/retry/compare/ce71cc2ab81d554ebbe88c79ab5975992d79ba08...ad984534de44a9489a53aefd81eb77f87c70dc60) Updates `softprops/action-gh-release` from 2.6.2 to 3.0.0 - [Release notes](https://github.com/softprops/action-gh-release/releases) - [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md) - [Commits](https://github.com/softprops/action-gh-release/compare/3bb12739c298aeb8a4eeaf626c5b8d85266b0e65...b4309332981a82ec1c5618f44dd2e27cc8bfbfda) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/github-script dependency-version: '9' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: nick-fields/retry dependency-version: 4.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: softprops/action-gh-release dependency-version: 3.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions ... Signed-off-by: dependabot[bot] <support@github.com>
69 lines
2.5 KiB
YAML
69 lines
2.5 KiB
YAML
name: Bump Winget Manifest
|
|
|
|
on:
|
|
release:
|
|
types: [released]
|
|
workflow_dispatch:
|
|
inputs:
|
|
tag:
|
|
description: 'Release tag to submit (for manual recovery)'
|
|
required: true
|
|
type: string
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: bump-winget-${{ github.event.release.tag_name || inputs.tag }}
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
bump:
|
|
if: github.event_name == 'workflow_dispatch' || github.event.release.prerelease == false
|
|
runs-on: windows-latest
|
|
timeout-minutes: 30
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Re-assert stable release
|
|
uses: ./.github/actions/assert-stable-release
|
|
with:
|
|
tag: ${{ github.event.release.tag_name || inputs.tag }}
|
|
is_prerelease: ${{ github.event.release.prerelease || 'false' }}
|
|
is_draft: ${{ github.event.release.draft || 'false' }}
|
|
|
|
- name: Submit manifest to winget-pkgs
|
|
uses: vedantmgoyal9/winget-releaser@4ffc7888bffd451b357355dc214d43bb9f23917e # v2
|
|
with:
|
|
identifier: VitorPamplona.Amethyst
|
|
version: ${{ github.event.release.tag_name || inputs.tag }}
|
|
# Asset naming contract: scripts/asset-name.sh
|
|
installers-regex: '^amethyst-desktop-.*-windows-x64\.msi$'
|
|
token: ${{ secrets.WINGET_TOKEN }}
|
|
|
|
- name: Report failure
|
|
if: failure()
|
|
uses: actions/github-script@v9
|
|
with:
|
|
script: |
|
|
const tag = context.payload.release?.tag_name || context.payload.inputs?.tag || 'unknown';
|
|
const runUrl = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`;
|
|
await github.rest.issues.create({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
title: `[release-ops] bump-winget failed for ${tag}`,
|
|
body: [
|
|
`Winget manifest submission failed for release \`${tag}\`.`,
|
|
``,
|
|
`- Run: ${runUrl}`,
|
|
`- Channel: Winget (\`VitorPamplona.Amethyst\`)`,
|
|
``,
|
|
`Recovery options:`,
|
|
`1. Re-run the workflow once underlying issue is fixed`,
|
|
`2. Manually submit via \`wingetcreate update VitorPamplona.Amethyst -v ${tag.replace(/^v/, '')}\``,
|
|
`3. File PR directly against microsoft/winget-pkgs`
|
|
].join('\n'),
|
|
labels: ['release-ops', 'bug']
|
|
});
|