Skip to content

release-published

release-published #1

#
# .github/workflows/release-published.yml
#
---
name: release-published
on:
release:
types: [published]
defaults:
run:
# Force all run commands to not use Rosetta 2
shell: arch -arm64 /bin/zsh -Negku {0}
jobs:
release-published:
if: ${{!github.event.repository.fork}}
runs-on: macos-15
steps:
- name: 🚰 Apply pr-pull label to custom tap formula bump PR
env:
GH_TOKEN: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}}
run: |
unsetopt errexit
bump_url="$(gh release -R "${GITHUB_REPOSITORY}" download "${GITHUB_REF_NAME}" -p bump.url -O - 2>/dev/null)"
found_bump_url="${?}"
setopt errexit
if [[ "${found_bump_url}" -eq 0 ]]; then
[[ -n "${bump_url}" ]] && gh pr edit "${bump_url}" --add-label pr-pull
gh release -R "${GITHUB_REPOSITORY}" delete-asset "${GITHUB_REF_NAME}" bump.url -y
else
printf $'No custom tap formula bump PR URL found for tag\'%s\'\n' "${GITHUB_REF_NAME}"
fi
- name: 🍺 Bump homebrew-core formula
if: ${{!github.event.release.prerelease}}
env:
HOMEBREW_GITHUB_API_TOKEN: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}}
run: |
brew bump-formula-pr\
--tag "${GITHUB_REF_NAME}"\
--revision "${GITHUB_SHA}"\
--fork-org "${GITHUB_REPOSITORY_OWNER}"\
--no-browse\
--online\
--strict\
--verbose\
mas