-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (32 loc) · 1.11 KB
/
formula_generator.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
name: Generate formula
on:
workflow_dispatch:
repository_dispatch:
types: [generate]
jobs:
generate:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Clone formula genetator
run: git clone https://github.com/byrdocs/Homebrew-formula-generator.git
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Install dependencies
run: |
pip install homebrew-pypi-poet byrdocs-cli
- name: Get byrdocs-cli version
id: get_version
run: echo "version=$(pip list --format freeze | grep byrdocs_cli | cut -d'=' -f3)" >> "$GITHUB_OUTPUT"
- name: Generate formula
run: python -m poet -f byrdocs-cli > byrdocs-cli.rb
- name: Setup GIT user
uses: fregante/setup-git-user@v1
- name: Update formula
run: |
git add byrdocs-cli.rb
git commit -m "Update byrdocs-cli formula to version ${{ steps.get_version.outputs.version }}"
git tag "v${{ steps.get_version.outputs.version }}"
git push origin --tags