Skip to content

Commit c49c87a

Browse files
committed
pr-upload
1 parent 891e234 commit c49c87a

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/build-bottle.yml

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
name: Build Homebrew bottle
22

33
on:
4+
workflow_dispatch:
45
push:
6+
branches: [build-bottle]
57

68
env:
79
HOMEBREW_DEVELOPER: 1
@@ -51,6 +53,11 @@ jobs:
5153
if: steps.cache.outputs.cache-hit != 'true'
5254
run: brew install-bundler-gems
5355

56+
- name: Uninstall existing formula
57+
run: brew uninstall --force --ignore-dependencies --formula "$FORMULA_NAME"
58+
env:
59+
FORMULA_NAME: ${{ matrix.formula }}
60+
5461
- name: Install formula
5562
run: brew install --build-bottle "$FORMULA_NAME"
5663
env:
@@ -75,6 +82,9 @@ jobs:
7582
upload:
7683
needs: build
7784
runs-on: ubuntu-latest
85+
permissions:
86+
contents: write
87+
pull-requests: write
7888
steps:
7989
- name: Set up Homebrew
8090
id: set-up-homebrew
@@ -104,7 +114,7 @@ jobs:
104114
- run: ls -l
105115

106116
- name: Upload bottles
107-
run: brew pr-upload --root-url "$BOTTLE_ROOT_URL" --keep-old --committer "Mislav Marohnić <[email protected]>" --warn-on-upload-failure
117+
run: brew pr-upload --root-url "$BOTTLE_ROOT_URL" --committer "Mislav Marohnić <[email protected]>" --warn-on-upload-failure
108118
env:
109119
HOMEBREW_GITHUB_PACKAGES_USER: mislav
110120
HOMEBREW_GITHUB_PACKAGES_TOKEN: ${{ secrets.BOTTLE_UPLOAD_TOKEN }}

0 commit comments

Comments
 (0)