Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release overhaul #67

Merged
merged 1 commit into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -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')
Expand All @@ -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}"
25 changes: 20 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
phatblat marked this conversation as resolved.
Show resolved Hide resolved

- name: Upload bottles as artifact
if: always() && github.event_name == 'pull_request'
uses: actions/upload-artifact@v4
Expand Down
Loading