Skip to content

Commit

Permalink
ci: brew
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed Nov 24, 2024
1 parent 41241bd commit 27ddcec
Show file tree
Hide file tree
Showing 2 changed files with 111 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/brew_install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Brew Install

on:
push:
branches:
- master
paths:
- '**.yml'
- 'Formula/**'
pull_request:
branches:
- master
paths-ignore:
- '**.md'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
#- ubuntu-latest # TODO: Add this!
- macos-latest

steps:
- name: Install Homebrew
run: |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- name: Setup Path
if: matrix.os == 'ubuntu-latest'
run: |
(echo; echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"') >> /home/runner/.bashrc
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
sudo apt-get install build-essential
- name: Install Qob CLI
run: |
brew tap cl-qob/cli https://github.com/cl-qob/packaging
brew install qob-cli
- run: qob --version
63 changes: 63 additions & 0 deletions .github/workflows/brew_update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Brew Update

on:
push:
branches:
- master
paths:
- '**.el'
- '**.yml'
- 'Formula/**'
pull_request:
branches:
- master
paths-ignore:
- '**.md'
workflow_run:
workflows: ["checksum"]
types:
- completed
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: jcs090218/setup-emacs@master
with:
version: 29.4

- uses: emacs-eask/setup-eask@master
with:
version: 'snapshot'

- name: Update Formula
run: |
eask install-deps
eask run script brew-update
- name: Set git config
run: |
git config user.name github-actions
git config user.email github-actions@github.com
- name: Commit
continue-on-error: true
run: |
git pull
git add .
git commit -m "Update Brew Formula"
- name: Push updated formula
continue-on-error: true
uses: jcs090218/github-push-action@master
with:
branch: master
rebase: true
retry: 7

0 comments on commit 27ddcec

Please sign in to comment.