-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (60 loc) · 2.1 KB
/
formula.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
name: Homebrew Formula
on:
repository_dispatch:
types: ["Update Homebrew Formula"]
workflow_dispatch:
inputs:
version:
description: "PaperAge release version (e.g. 1.2.3)"
required: true
push:
permissions:
id-token: write
contents: write
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: chainguard-dev/actions/setup-gitsign@01b5d32c57fb6cd0c00c99922043d03c527b10e0
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.1"
bundler-cache: true
- name: Set up Homebrew
run: |
NONINTERACTIVE=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo "/home/linuxbrew/.linuxbrew/bin" >> $GITHUB_PATH
- name: Local Tap
run: |
eval "$(brew shellenv)"
mkdir -p `brew --repo`/Library/Taps/matiaskorhonen
ln -s `realpath ./` `brew --repo`/Library/Taps/matiaskorhonen/homebrew-paper-age
- name: Update the formula
run: "./bin/update_formula.rb ${{ github.event.inputs.version || github.event.client_payload.version || '1.1.0' }}"
- name: Test the formula
run: |
eval "$(brew shellenv)"
brew install paper-age
brew test --debug --force paper-age
- name: Add and commit (workflow_dispatch)
if: github.event_name == 'workflow_dispatch'
uses: EndBug/add-and-commit@v9
with:
add: "./Formula"
default_author: github_actions
message: "Update to PaperAge v${{ github.event.inputs.version }}"
tag: ${{ format('v{0} --force', github.event.inputs.version) }}
tag_push: "--force"
push: true
- name: Add and commit (repository_dispatch)
if: github.event_name == 'repository_dispatch'
uses: EndBug/add-and-commit@v9
with:
add: "./Formula"
default_author: github_actions
message: "Update to PaperAge v${{ github.event.client_payload.version }}"
tag: ${{ format('v{0} --force', github.event.client_payload.version) }}
tag_push: "--force"
push: true