Skip to content

Commit

Permalink
pr-upload
Browse files Browse the repository at this point in the history
  • Loading branch information
mislav committed Jan 10, 2025
1 parent 891e234 commit c49c87a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/build-bottle.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Build Homebrew bottle

on:
workflow_dispatch:
push:
branches: [build-bottle]

env:
HOMEBREW_DEVELOPER: 1
Expand Down Expand Up @@ -51,6 +53,11 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'
run: brew install-bundler-gems

- name: Uninstall existing formula
run: brew uninstall --force --ignore-dependencies --formula "$FORMULA_NAME"
env:
FORMULA_NAME: ${{ matrix.formula }}

- name: Install formula
run: brew install --build-bottle "$FORMULA_NAME"
env:
Expand All @@ -75,6 +82,9 @@ jobs:
upload:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Set up Homebrew
id: set-up-homebrew
Expand Down Expand Up @@ -104,7 +114,7 @@ jobs:
- run: ls -l

- name: Upload bottles
run: brew pr-upload --root-url "$BOTTLE_ROOT_URL" --keep-old --committer "Mislav Marohnić <git@mislav.net>" --warn-on-upload-failure
run: brew pr-upload --root-url "$BOTTLE_ROOT_URL" --committer "Mislav Marohnić <git@mislav.net>" --warn-on-upload-failure
env:
HOMEBREW_GITHUB_PACKAGES_USER: mislav
HOMEBREW_GITHUB_PACKAGES_TOKEN: ${{ secrets.BOTTLE_UPLOAD_TOKEN }}
Expand Down

0 comments on commit c49c87a

Please sign in to comment.