-
-
Notifications
You must be signed in to change notification settings - Fork 219
77 lines (65 loc) · 2.4 KB
/
homebrew.yml
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Homebrew
on: [pull_request]
jobs:
test:
runs-on: macos-latest
steps:
- run: brew --version
- run: brew tap maplibre/martin
- run: brew install martin
- name: Checkout maplibre/homebrew-martin
if: startsWith(github.ref, 'refs/tags/')
uses: actions/checkout@v4
with:
repository: maplibre/homebrew-martin
token: ${{ secrets.GH_HOMEBREW_MARTIN_TOKEN }}
path: target/homebrew
- name: Create Homebrew config
if: startsWith(github.ref, 'refs/tags/v')
run: |
set -x
# Extract Github release version only without the "v" prefix
MARTIN_VERSION=$(echo "refs/tags/v0.9.4" | sed -e 's/refs\/tags\/v//')
mkdir -p target/homebrew
cd target
cat << EOF > homebrew_config.yaml
version: "$MARTIN_VERSION"
macos_arm_sha256: "TEST_macos_arm_sha256"
macos_intel_sha256: "TEST_macos_intel_sha256"
linux_arm_sha256: "TEST_linux_arm_sha256"
linux_intel_sha256: "TEST_linux_intel_sha256"
EOF
- name: Create Homebrew formula
if: startsWith(github.ref, 'refs/tags/')
uses: cuchi/[email protected]
with:
template: .github/templates/homebrew.martin.rb.j2
output_file: target/homebrew/martin.rb
data_file: target/homebrew_config.yaml
- name: Create a PR for maplibre/homebrew-martin
if: startsWith(github.ref, 'refs/tags/')
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GH_HOMEBREW_MARTIN_TOKEN }}
commit-message: "Update to ${{ github.ref }}"
title: "Update to ${{ github.ref }}"
body: "Update to ${{ github.ref }}"
branch: "update-to-${{ github.ref }}"
branch-suffix: timestamp
base: "main"
labels: "auto-update"
assignees: "nyurik"
draft: false
delete-branch: true
path: target/homebrew
# - name: Checkout code
# uses: actions/checkout@v2
#
# - name: Set up Homebrew
# run: |
# brew update
# brew install --build-bottle formula # Replace 'formula' with the name of your formula
#
# - name: Test Formula Installation
# run: |
# brew install --verbose formula # Replace 'formula' with the name of your formula