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>
72 lines
2.7 KiB
YAML
72 lines
2.7 KiB
YAML
name: Bump Homebrew Cask
|
|
|
|
# Fires when a GH Release is published (not draft, not prerelease).
|
|
# `release.types: [released]` event fires only for stable releases — still
|
|
# double-checked by .github/actions/assert-stable-release for defense-in-depth.
|
|
on:
|
|
release:
|
|
types: [released]
|
|
workflow_dispatch:
|
|
inputs:
|
|
tag:
|
|
description: 'Release tag to bump (for manual recovery)'
|
|
required: true
|
|
type: string
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
# Serialize bumps per tag; do not cancel in-progress bumps.
|
|
group: bump-homebrew-${{ 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: ubuntu-latest # brew runs on Linux — saves macOS runner quota
|
|
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: Bump cask (push-or-update PR)
|
|
uses: macauley/action-homebrew-bump-cask@ad984534de44a9489a53aefd81eb77f87c70dc60 # v4.0.0
|
|
with:
|
|
token: ${{ secrets.HOMEBREW_TOKEN }}
|
|
tap: homebrew/cask
|
|
cask: amethyst-nostr
|
|
tag: ${{ github.event.release.tag_name || inputs.tag }}
|
|
|
|
- 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-homebrew failed for ${tag}`,
|
|
body: [
|
|
`Homebrew cask bump failed for release \`${tag}\`.`,
|
|
``,
|
|
`- Run: ${runUrl}`,
|
|
`- Channel: Homebrew Cask (\`amethyst-nostr\`)`,
|
|
``,
|
|
`Recovery options:`,
|
|
`1. Re-run the workflow once underlying issue is fixed`,
|
|
`2. Manually run \`brew bump-cask-pr amethyst-nostr --version ${tag.replace(/^v/, '')}\``,
|
|
`3. File PR directly against Homebrew/homebrew-cask`
|
|
].join('\n'),
|
|
labels: ['release-ops', 'bug']
|
|
});
|