chore: migrate all URLs to git.jskdjs.cn, drop GitHub-specific distribution
This commit is contained in:
@@ -1,43 +0,0 @@
|
||||
name: Update Homebrew Formula
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
update-homebrew:
|
||||
name: Update homebrew-runaway formula
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
repository: mateussiqueira/homebrew-runaway
|
||||
token: ${{ secrets.GH_PAT || github.token }}
|
||||
|
||||
- name: Download release artifact and compute SHA
|
||||
id: sha
|
||||
run: |
|
||||
TAG="${{ github.event.release.tag_name }}"
|
||||
curl -sL "https://github.com/mateussiqueira/runaway/releases/download/${TAG}/runaway-standalone.sh" -o /tmp/runaway-standalone.sh
|
||||
SHA=$(shasum -a 256 /tmp/runaway-standalone.sh | cut -d' ' -f1)
|
||||
echo "sha=${SHA}" >> $GITHUB_OUTPUT
|
||||
echo "tag=${TAG}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Update formula URL and SHA
|
||||
run: |
|
||||
VERSION="${{ github.event.release.tag_name }}"
|
||||
VERSION="${VERSION#v}"
|
||||
SHA="${{ steps.sha.outputs.sha }}"
|
||||
TAG="${{ steps.sha.outputs.tag }}"
|
||||
|
||||
sed -i "s|url \".*\"|url \"https://raw.githubusercontent.com/mateussiqueira/runaway/${TAG}/runaway-standalone.sh\"|" Formula/runaway.rb
|
||||
sed -i "s|version \".*\"|version \"${VERSION}\"|" Formula/runaway.rb
|
||||
sed -i "s|sha256 \".*\"|sha256 \"${SHA}\"|" Formula/runaway.rb
|
||||
|
||||
- name: Commit and push
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git add Formula/runaway.rb
|
||||
git diff --cached --quiet || git commit -m "chore: update formula to ${{ github.event.release.tag_name }}"
|
||||
git push
|
||||
Reference in New Issue
Block a user