mirror of
https://github.com/lukaszraczylo/homebrew-taps.git
synced 2026-10-16 01:07:33 +00:00
fix(casks): use postflight_steps and rewrite GoReleaser output on push
GoReleaser writes the quarantine hook as a postflight block on each release. Homebrew 7 deprecates that block. The new workflow rewrites it to postflight_steps after every push to main.
This commit is contained in:
@@ -0,0 +1,34 @@
|
|||||||
|
name: Fix GoReleaser casks
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- 'Casks/**'
|
||||||
|
- 'scripts/fix-casks.sh'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
fix-casks:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Rewrite postflight blocks
|
||||||
|
run: scripts/fix-casks.sh
|
||||||
|
|
||||||
|
- name: Commit and push changes
|
||||||
|
run: |
|
||||||
|
if git diff --quiet Casks/; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
git config --local user.name "github-actions[bot]"
|
||||||
|
git add Casks/
|
||||||
|
git commit -m "fix(casks): rewrite postflight to postflight_steps"
|
||||||
|
git push
|
||||||
@@ -33,10 +33,9 @@ cask "harness-sync" do
|
|||||||
|
|
||||||
binary "harness-sync"
|
binary "harness-sync"
|
||||||
|
|
||||||
postflight do
|
postflight_steps do
|
||||||
if OS.mac?
|
on_macos do
|
||||||
system_command "/usr/bin/xattr",
|
run "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "{{staged_path}}/harness-sync"]
|
||||||
args: ["-dr", "com.apple.quarantine", "#{staged_path}/harness-sync"]
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
+3
-4
@@ -33,10 +33,9 @@ cask "kportal" do
|
|||||||
|
|
||||||
binary "kportal"
|
binary "kportal"
|
||||||
|
|
||||||
postflight do
|
postflight_steps do
|
||||||
if OS.mac?
|
on_macos do
|
||||||
system_command "/usr/bin/xattr",
|
run "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "{{staged_path}}/kportal"]
|
||||||
args: ["-dr", "com.apple.quarantine", "#{staged_path}/kportal"]
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
+3
-4
@@ -33,10 +33,9 @@ cask "lolcathost" do
|
|||||||
|
|
||||||
binary "lolcathost"
|
binary "lolcathost"
|
||||||
|
|
||||||
postflight do
|
postflight_steps do
|
||||||
if OS.mac?
|
on_macos do
|
||||||
system_command "/usr/bin/xattr",
|
run "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "{{staged_path}}/lolcathost"]
|
||||||
args: ["-dr", "com.apple.quarantine", "#{staged_path}/lolcathost"]
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -33,10 +33,9 @@ cask "mcp-filepuff" do
|
|||||||
|
|
||||||
binary "mcp-filepuff"
|
binary "mcp-filepuff"
|
||||||
|
|
||||||
postflight do
|
postflight_steps do
|
||||||
if OS.mac?
|
on_macos do
|
||||||
system_command "/usr/bin/xattr",
|
run "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "{{staged_path}}/mcp-filepuff"]
|
||||||
args: ["-dr", "com.apple.quarantine", "#{staged_path}/mcp-filepuff"]
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
+3
-4
@@ -33,10 +33,9 @@ cask "readitall" do
|
|||||||
|
|
||||||
binary "readitall"
|
binary "readitall"
|
||||||
|
|
||||||
postflight do
|
postflight_steps do
|
||||||
if OS.mac?
|
on_macos do
|
||||||
system_command "/usr/bin/xattr",
|
run "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "{{staged_path}}/readitall"]
|
||||||
args: ["-dr", "com.apple.quarantine", "#{staged_path}/readitall"]
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -33,10 +33,9 @@ cask "semver-generator" do
|
|||||||
|
|
||||||
binary "semver-generator"
|
binary "semver-generator"
|
||||||
|
|
||||||
postflight do
|
postflight_steps do
|
||||||
if OS.mac?
|
on_macos do
|
||||||
system_command "/usr/bin/xattr",
|
run "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "{{staged_path}}/semver-generator"]
|
||||||
args: ["-dr", "com.apple.quarantine", "#{staged_path}/semver-generator"]
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user