Skip to content

Action Server manual Brew publish #15

Action Server manual Brew publish

Action Server manual Brew publish #15

Workflow file for this run

name: Action Server manual Brew publish
on:
workflow_dispatch:
inputs:
version:
description: 'Version to upload'
required: true
default: 'x.x.x'
jobs:
action-server:
name: action-server
runs-on: macos-13
permissions:
contents: write # Ensuring the job has permission to write to the repository.
steps:
- name: main checkout
uses: actions/checkout@v4
- name: Update cask recipe
run: |
cd scripts
chmod +x ./homebrew-update.sh
./homebrew-update.sh ${{ github.event.inputs.version }}
- name: Install and Test Cask
run: |
brew install --cask Casks/action-server.rb
installed_version=$(action-server version)
echo "Installed Version: $installed_version"
if [ "$installed_version" != "${{ github.event.inputs.version }}" ]; then
echo "Version mismatch: expected ${{ github.event.inputs.version }}, got $installed_version"
exit 1
fi
- name: Commit and Push
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email 'actions@github.com'
git add Casks/action-server.rb
git commit -m "Update Action Server to version ${{ github.event.inputs.version }}"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Using the GITHUB_TOKEN for authentication.