{"id":16486159,"url":"https://github.com/xsc/homebrew-import-release-action","last_synced_at":"2025-02-28T23:47:47.088Z","repository":{"id":54223043,"uuid":"343150446","full_name":"xsc/homebrew-import-release-action","owner":"xsc","description":"Github Action to create a Homebrew formula from a Github release ","archived":false,"fork":false,"pushed_at":"2021-03-04T15:33:13.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-13T21:26:25.373Z","etag":null,"topics":["github-action","homebrew","homebrew-formula"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xsc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-28T16:17:08.000Z","updated_at":"2021-03-04T15:33:15.000Z","dependencies_parsed_at":"2023-01-11T17:23:16.783Z","dependency_job_id":null,"html_url":"https://github.com/xsc/homebrew-import-release-action","commit_stats":{"total_commits":21,"total_committers":1,"mean_commits":21.0,"dds":0.0,"last_synced_commit":"e4e8ac29a3a9eb1703252fe596ccb62ff51d8c91"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xsc%2Fhomebrew-import-release-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xsc%2Fhomebrew-import-release-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xsc%2Fhomebrew-import-release-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xsc%2Fhomebrew-import-release-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xsc","download_url":"https://codeload.github.com/xsc/homebrew-import-release-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238161871,"owners_count":19426755,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github-action","homebrew","homebrew-formula"],"created_at":"2024-10-11T13:28:31.610Z","updated_at":"2025-02-28T23:47:47.070Z","avatar_url":"https://github.com/xsc.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# homebrew-import-release-action\n\n[![CI](https://github.com/xsc/homebrew-import-release-action/workflows/CI/badge.svg)](https://github.com/xsc/homebrew-import-release-action/actions?query=workflow%3ACI)\n[![Release](https://img.shields.io/github/v/release/xsc/homebrew-import-release-action?include_prereleases\u0026sort=semver)](https://github.com/xsc/homebrew-import-release-action/releases/latest)\n\nThis is a [Github Action][gha] to populate a [Homebrew tap][tap] with formulas\nbased on Github releases and their assets.\n\n## Usage\n\n```yaml\n- uses: xsc/homebrew-import-release-action@v2\n  id: formula\n  with:\n    template: into-docker.template.rb\n    target: into-docker.rb\n    repository: into-docker/into-docker\n    asset-selector: macos-amd64.zip\n```\n\nAfterwards, you can use e.g. [create-pull-request][] to allow for a review of\nthe changes:\n\n```yaml\n- uses: peter-evans/create-pull-request@v3\n  with:\n    title: \"Update 'into-docker' formula (${{ steps.formula.outputs.version }})\"\n    commit-message: \"Formula: into-docker@${{ steps.formula.outputs.version }}\"\n    branch: \"update-formula/into-docker-${{ steps.formula.outputs.version }}\"\n```\n\n(I suspect you should not commit these directly.)\n\n[create-pull-request]: https://github.com/marketplace/actions/create-pull-request\n\n## Prerequisites\n\n- Existing Github release with corresponding tag (e.g. `v1.0.0`).\n- An asset attached to the release that matches a defined selector (see below).\n- A template file that can use the following variables for substitution:\n  - `HOMEBREW_VERSION`: version of the formula.\n  - `HOMEBREW_ASSET_URL`: URL to the matched release asset.\n  - `HOMEBREW_SHA256`: SHA-256 hash of the matched release asset.\n  - `HOMEBREW_ASSET_URL_ALT`: URL to the alternative release asset (e.g. Linux version).\n  - `HOMEBREW_SHA256_ALT`: SHA-256 hash of the alternative release asset (e.g. Linux version).\n\n## Inputs\n\n| Name                 | Required | Description                                                                        |\n| :------------------- | :------: | :--------------------------------------------------------------------------------- |\n| `template`           |   Yes    | Local path to the template file.                                                   |\n| `target`             |   Yes    | Local path to the output file.                                                     |\n| `repository`         |   Yes    | Repository to query for releases.                                                  |\n| `asset-selector`     |   Yes    | Substring that is contained within the main asset's filename.                      |\n| `alt-asset-selector` |    No    | Substring that is contained within the alternative asset's filename.               |\n| `tag`                |    No    | Specific release tag to use for creating the formula (defaults to latest release). |\n| `version`            |    No    | Override the formula version (defaults to using the tag minus a `v` prefix)        |\n\n## Outputs\n\n| Name         | Description                                                   |\n| :----------- | :------------------------------------------------------------ |\n| `target`     | Path to the output file (echoed).                             |\n| `version`    | Version of the formula (useful if inferred from the release). |\n| `releaseUrl` | URL pointing at the Github release.                           |\n\n## Development\n\nWe use [prettier][] to ensure consistent formatting of Markdown and YAML files.\nPlease run `yarn` or `npm install` to register the pre-commit hook.\n\n[gha]: https://help.github.com/en/actions\n[tap]: https://docs.brew.sh/Taps\n[prettier]: https://prettier.io/\n\n## License\n\n```\nMIT License\n\nCopyright (c) 2021 Yannick Scherer\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxsc%2Fhomebrew-import-release-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxsc%2Fhomebrew-import-release-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxsc%2Fhomebrew-import-release-action/lists"}