Skip to content

Bump muzimuzhi/beta/texstudio-beta cask to 4.8.6alpha1 #28

Bump muzimuzhi/beta/texstudio-beta cask to 4.8.6alpha1

Bump muzimuzhi/beta/texstudio-beta cask to 4.8.6alpha1 #28

Workflow file for this run

name: Bump a Homebrew Formula/Cask
# example name: 'Bump texstudio cask to 5.0.0'
run-name: >-
Bump ${{ inputs.name }}
${{ inputs.command == 'bump-formula-pr' && 'formula' || 'cask' }}
to ${{ inputs.version }}
on:
workflow_dispatch:
inputs:
command:
description: 'Bump subcommand to run'
required: false
default: 'bump-cask-pr'
type: choice
options:
- 'bump-formula-pr'
- 'bump-cask-pr'
name:
description: 'Name of formula or cask'
required: false
default: 'texstudio'
type: string
version:
description: 'New version'
required: true
type: string
jobs:
run-bump:
name: ${{ inputs.command }}
runs-on: macos-14
steps:
- name: Preparations
run: |
git config set --global user.name "${{ secrets.GIT_USER_NAME }}"
git config set --global user.email "${{ secrets.GIT_USER_EMAIL }}"
brew update
- name: Run "brew ${{ inputs.command }}"
env:
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
run: |
if [[ ${{ inputs.name }} == *"/"* ]]; then
tap=${{ inputs.name }}
brew tap "${tap%/*}"
fi
# https://docs.brew.sh/Manpage#bump-formula-pr-options-formula
# https://docs.brew.sh/Manpage#bump-cask-pr-options-cask
brew ${{ inputs.command }} \
--no-browse \
${{ inputs.command == 'bump-formula-pr' && '--online' || '' }} \
--version=${{ inputs.version }} \
${{ inputs.name }}
# run `touch continue` in GITHUB_WORKSPACE to continue
# https://github.com/mxschmitt/action-tmate/tree/v3/?tab=readme-ov-file#continue-a-workflow
# - name: Setup tmate session
# if: failure()
# timeout-minutes: 15
# uses: mxschmitt/action-tmate@v3