Skip to content

Commit

Permalink
👷 automate brew formula update
Browse files Browse the repository at this point in the history
  • Loading branch information
pyaillet committed Jan 13, 2024
1 parent eae5d0e commit b6e7cea
Showing 1 changed file with 62 additions and 15 deletions.
77 changes: 62 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,68 @@
name: Finalize Release

permissions:
contents: write

on:
release:
types: [prereleased, released]
types: [published]

jobs:
upload-assets-hash:
homebrew-releaser:
runs-on: ubuntu-latest
name: homebrew-releaser
steps:
- uses: MCJack123/ghaction-generate-release-hashes@v3
with:
hash-type: sha256
file-name: hashes.txt
- uses: actions/upload-artifact@v2
with:
name: Asset Hashes
path: hashes.txt
- name: Release my project to my Homebrew tap
uses: Justintime50/homebrew-releaser@v1
with:
homebrew_owner: pyaillet
homebrew_tap: homebrew-formulas

formula_folder: pyaillet

# The Personal Access Token (saved as a repo secret) that has `repo` permissions for the repo running the action AND Homebrew tap you want to release to.
# Required - string
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}

commit_owner: pyaillet
commit_email: [email protected]

# Custom install command for your formula.
# Required - string
install: 'bin.install "doggy" => "doggy"'

# Custom test command for your formula so you can run `brew test`.
# Optional - string
test: 'assert_match("doggy", shell_output("doggy --version"))'

# Adds URL and checksum targets for different OS and architecture pairs. Using this option assumes
# a tar archive exists on your GitHub repo with the following URL pattern (this cannot be customized):
# https://github.com/{GITHUB_OWNER}/{REPO_NAME}/releases/download/{TAG}/{REPO_NAME}-{VERSION}-{OPERATING_SYSTEM}-{ARCHITECTURE}.tar.gz'
# Darwin AMD pre-existing path example: https://github.com/justintime50/myrepo/releases/download/v1.2.0/myrepo-1.2.0-darwin-amd64.tar.gz
# Linux ARM pre-existing path example: https://github.com/justintime50/myrepo/releases/download/v1.2.0/myrepo-1.2.0-linux-arm64.tar.gz
# Optional - booleans
target_darwin_amd64: true
target_darwin_arm64: false
target_linux_amd64: true
target_linux_arm64: false

# Update your homebrew tap's README with a table of all projects in the tap.
# This is done by pulling the information from all your formula.rb files - eg:
#
# | Project | Description | Install |
# | ------------------------------------------ | ------------ | ------------------------ |
# | [formula_1](https://github.com/user/repo1) | helpful text | `brew install formula_1` |
# | [formula_2](https://github.com/user/repo2) | helpful text | `brew install formula_2` |
# | [formula_3](https://github.com/user/repo3) | helpful text | `brew install formula_3` |
#
# Place the following in your README or wrap your project's table in these comment tags:
# <!-- project_table_start -->
# TABLE HERE
# <!-- project_table_end -->
#
# Finally, mark `update_readme_table` as `true` in your GitHub Action config and we'll do the work of building a custom table for you.
# Default is `false` - boolean
update_readme_table: true

# Skips committing the generated formula to a homebrew tap (useful for local testing).
# Default is shown - boolean
skip_commit: false

# Logs debugging info to console.
# Default is shown - boolean
debug: true

0 comments on commit b6e7cea

Please sign in to comment.