forked from derisk-ai/OpenDerisk
-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (28 loc) · 1.13 KB
/
homebrew.yml
File metadata and controls
34 lines (28 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Publish to Homebrew
on:
push:
tags:
- 'v*'
jobs:
homebrew:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Update Homebrew Formula
run: |
VERSION=${GITHUB_REF#refs/tags/v}
URL="https://github.com/derisk-ai/OpenDerisk/archive/refs/tags/v${VERSION}.tar.gz"
SHA256=$(curl -sL "$URL" | sha256sum | cut -d' ' -f1)
sed -i "s/PLACEHOLDER_SHA256/${SHA256}/g" homebrew/openderisk.rb
sed -i "s|url \"https://github.com/derisk-ai/OpenDerisk/archive/refs/tags/v0.2.0.tar.gz\"|url \"${URL}\"|g" homebrew/openderisk.rb
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "chore: update homebrew formula for ${{ github.ref_name }}"
title: "Update Homebrew formula to ${{ github.ref_name }}"
body: |
Automated update of Homebrew formula for new release.
- Updated URL to ${{ github.ref_name }}
- Updated SHA256 checksum
branch: update-homebrew-formula