diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 34da9c3..2ca6205 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,10 +1,10 @@ name: brew pr-pull - on: pull_request_target: - types: - - labeled - + types: [labeled] +defaults: + run: + shell: /bin/zsh -Negku {0} jobs: pr-pull: if: contains(github.event.pull_request.labels.*.name, 'pr-pull') @@ -21,18 +21,18 @@ jobs: - name: Pull bottles env: - HOMEBREW_GITHUB_API_TOKEN: ${{ github.token }} - PULL_REQUEST: ${{ github.event.pull_request.number }} - run: brew pr-pull --debug --tap="$GITHUB_REPOSITORY" "$PULL_REQUEST" + HOMEBREW_GITHUB_API_TOKEN: ${{github.token}} + PULL_REQUEST: ${{github.event.pull_request.number}} + run: brew pr-pull --debug --tap="${GITHUB_REPOSITORY}" "${PULL_REQUEST}" - name: Push commits uses: Homebrew/actions/git-try-push@master with: - token: ${{ github.token }} + token: ${{github.token}} branch: main - name: Delete branch if: github.event.pull_request.head.repo.fork == false env: - BRANCH: ${{ github.event.pull_request.head.ref }} - run: git push --delete origin "$BRANCH" + BRANCH: ${{github.event.pull_request.head.ref}} + run: git push --delete origin "${BRANCH}" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 115976c..abe5e4b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,16 +1,16 @@ name: brew test-bot - on: push: - branches: - - main + branches: [main] pull_request: - +defaults: + run: + shell: /bin/zsh -Negku {0} jobs: test-bot: strategy: matrix: - os: [macos-13, macos-14, macos-15] + os: [macos-13, macos-15] runs-on: ${{matrix.os}} steps: - name: Set up Homebrew @@ -33,6 +33,21 @@ jobs: - run: brew test-bot --only-formulae if: github.event_name == 'pull_request' + - name: Rename bottle + if: github.event_name == 'pull_request' + run: | + autoload zmv + if [[ "${ImageOS}" = macos15 ]]; then + (zmv 'mas-(*).arm64_sequoia.bottle.tar.gz' 'mas-$1.arm64_big_sur.bottle.tar.gz') || true + else + (zmv 'mas-(*).ventura.bottle.tar.gz' 'mas-$1.high_sierra.bottle.tar.gz') || true + fi + + - name: Download 1.8.6 bottle + if: github.event_name == 'pull_request' && matrix.os == 'macos-15' + run: | + curl -LO https://github.com/mas-cli/mas/releases/download/v1.8.6/mas-1.8.6.el_capitan.bottle.tar.gz + - name: Upload bottles as artifact if: always() && github.event_name == 'pull_request' uses: actions/upload-artifact@v4