openpencil/.github/workflows/homebrew.yml
Danila Poyarkov 6ffe201bec StrokeSection: compose from PropertyListRoot (388→180 lines)
Stroke CRUD (add/remove/toggle/update color+weight) now uses
PropertyListRoot from SDK. Stroke-specific logic (sides, align,
border weights) stays in app component as functions taking activeNode.
2026-03-17 15:08:34 +03:00

49 lines
1.5 KiB
YAML

name: Update Homebrew Tap
on:
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: 'Release tag (e.g. v0.10.0)'
required: true
permissions: {}
jobs:
update-tap:
runs-on: macos-latest
steps:
- name: Update cask
env:
GH_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
run: |
TAG="${{ github.event.inputs.tag || github.ref_name }}"
VERSION="${TAG#v}"
TMPDIR=$(mktemp -d)
gh release download "$TAG" \
--repo "$GITHUB_REPOSITORY" \
--pattern 'OpenPencil_aarch64.app.tar.gz' \
--pattern 'OpenPencil_x64.app.tar.gz' \
--dir "$TMPDIR"
SHA_ARM=$(shasum -a 256 "$TMPDIR/OpenPencil_aarch64.app.tar.gz" | cut -d' ' -f1)
SHA_X64=$(shasum -a 256 "$TMPDIR/OpenPencil_x64.app.tar.gz" | cut -d' ' -f1)
gh repo clone open-pencil/homebrew-tap "$TMPDIR/tap"
cd "$TMPDIR/tap"
sed -i '' \
-e "s/version \".*\"/version \"$VERSION\"/" \
-e "/on_arm/,/end/{s/sha256 \".*\"/sha256 \"$SHA_ARM\"/;}" \
-e "/on_intel/,/end/{s/sha256 \".*\"/sha256 \"$SHA_X64\"/;}" \
Casks/open-pencil.rb
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add Casks/open-pencil.rb
git commit -m "Update OpenPencil to $VERSION"
git push