From c49c87a5e92c20bc4d1032e4bb238827fd42aba7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Fri, 10 Jan 2025 22:18:16 +0100 Subject: [PATCH] pr-upload --- .github/workflows/build-bottle.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-bottle.yml b/.github/workflows/build-bottle.yml index c25ae19..3cb3778 100644 --- a/.github/workflows/build-bottle.yml +++ b/.github/workflows/build-bottle.yml @@ -1,7 +1,9 @@ name: Build Homebrew bottle on: + workflow_dispatch: push: + branches: [build-bottle] env: HOMEBREW_DEVELOPER: 1 @@ -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: @@ -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 @@ -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ć " --warn-on-upload-failure + run: brew pr-upload --root-url "$BOTTLE_ROOT_URL" --committer "Mislav Marohnić " --warn-on-upload-failure env: HOMEBREW_GITHUB_PACKAGES_USER: mislav HOMEBREW_GITHUB_PACKAGES_TOKEN: ${{ secrets.BOTTLE_UPLOAD_TOKEN }}