diff --git a/.github/workflows/bump-cask.yaml b/.github/workflows/bump-cask.yaml deleted file mode 100644 index 5bd9ff9e7..000000000 --- a/.github/workflows/bump-cask.yaml +++ /dev/null @@ -1,33 +0,0 @@ -name: Bump homebrew-cask - -on: - workflow_dispatch: - inputs: - tag-name: - description: 'The git tag name to bump the formula to' - required: true - -jobs: - manual-cask-bump: - runs-on: macos-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Extract version - id: extract-version - run: | - printf "::set-output name=%s::%s\n" tag-name "${GITHUB_REF#refs/tags/}" - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version-file: 'go.mod' - - name: Bump cf-terraforming cask in cloudflare/homebrew-cloudflare - uses: macauley/action-homebrew-bump-cask@v1 - with: - token: ${{ secrets.BUMP_CASK_TOKEN }} - tap: cloudflare/homebrew-cloudflare - cask: cf-terraforming - livecheck: true - dryrun: false diff --git a/.github/workflows/bump-formula.yaml b/.github/workflows/bump-formula.yaml new file mode 100644 index 000000000..61d05a8df --- /dev/null +++ b/.github/workflows/bump-formula.yaml @@ -0,0 +1,33 @@ +on: + release: + types: [ released ] + workflow_dispatch: + inputs: + tag-name: + description: 'The git tag name to bump the formula to (including the "v" prefix)' + required: true + +jobs: + homebrew: + name: Bump Homebrew formula + runs-on: ubuntu-latest + steps: + - name: Extract version + id: extract-version + run: | + if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then + echo "tag-name=${{ inputs.tag-name }}" >> $GITHUB_OUTPUT + else + echo "tag-name=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT + fi + - uses: mislav/bump-homebrew-formula-action@v3 + with: + formula-name: cf-terraforming + formula-path: cf-terraforming.rb + homebrew-tap: cloudflare/homebrew-cloudflare + tag-name: ${{ steps.extract-version.outputs.tag-name }} + download-url: https://github.com/cloudflare/cf-terraforming/archive/refs/tags/${{ steps.extract-version.outputs.tag-name }}.tar.gz + commit-message: | + Updates {{formulaName}} to {{version}} + env: + COMMITTER_TOKEN: ${{ secrets.BUMP_CASK_TOKEN }}