在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:mislav/bump-homebrew-formula-action开源软件地址:https://github.com/mislav/bump-homebrew-formula-action开源编程语言:TypeScript 99.8%开源软件介绍:An action that bumps a Homebrew formula after a new release. Minimal usage example: on:
push:
tags: 'v*'
jobs:
homebrew:
name: Bump Homebrew formula
runs-on: ubuntu-latest
steps:
- uses: mislav/bump-homebrew-formula-action@v2
with:
# A PR will be sent to github.com/Homebrew/homebrew-core to update this formula:
formula-name: my_formula
env:
COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }} The Comprehensive usage example: on:
push:
tags: 'v*'
jobs:
homebrew:
name: Bump Homebrew formula
runs-on: ubuntu-latest
steps:
- name: Extract version
id: extract-version
run: |
printf "::set-output name=%s::%s\n" tag-name "${GITHUB_REF#refs/tags/}"
- uses: mislav/bump-homebrew-formula-action@v2
if: "!contains(github.ref, '-')" # skip prereleases
with:
formula-name: my_formula
formula-path: Formula/my_formula.rb
homebrew-tap: Homebrew/homebrew-core
base-branch: master
download-url: https://example.com/foo/${{ steps.extract-version.outputs.tag-name }}.tar.gz
commit-message: |
{{formulaName}} {{version}}
Created by https://github.com/mislav/bump-homebrew-formula-action
env:
COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} You should enable Action inputs
How it worksGiven a Homebrew formula class MyFormula < Formula
url "https://github.com/me/myproject/archive/v1.2.3.tar.gz"
sha256 "<OLDSHA>"
# ...
end After we push a class MyFormula < Formula
url "https://github.com/me/myproject/archive/v2.0.0.tar.gz"
sha256 "<NEWSHA>"
# ...
end This action can update the following Homebrew formula fields:
If the current If the token has push access, but the default branch of the tap repo is protected, a pull request will be opened from a new branch in the same repo. Otherwise, the formula will be edited via a direct push to the default branch.
This can be overriden by setting Manual triggerHere's an example of how to set up this action to be manually triggered instead of being triggered by pushing to a git tag: on:
workflow_dispatch:
inputs:
tag-name:
description: 'The git tag name to bump the formula to'
required: true
jobs:
homebrew:
name: Bump Homebrew formula
runs-on: ubuntu-latest
steps:
- uses: mislav/bump-homebrew-formula-action@v2
with:
formula-name: my_formula
tag-name: ${{ github.event.inputs.tag-name }}
download-url: https://example.com/foo/${{ github.event.inputs.tag-name }}.tar.gz
env:
COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }} |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论