Skip to content

new-release

new-release #6

Workflow file for this run

name: Bump Formula
on:
repository_dispatch:
types: [new-release]
jobs:
bump:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
token: ${{ secrets.AUTO_PR_TOKEN }}
- name: Compute SHA256
id: sha
run: |
VERSION="${{ github.event.client_payload.version }}"
URL="https://registry.npmjs.org/@node9/proxy/-/proxy-${VERSION}.tgz"
SHA=$(curl -sL "$URL" | sha256sum | awk '{print $1}')
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "sha256=$SHA" >> $GITHUB_OUTPUT
echo "url=$URL" >> $GITHUB_OUTPUT
- name: Update formula
run: |
sed -i "s|url \".*\"|url \"${{ steps.sha.outputs.url }}\"|" Formula/node9.rb
sed -i "s|sha256 \".*\"|sha256 \"${{ steps.sha.outputs.sha256 }}\"|" Formula/node9.rb
- name: Commit and push
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add Formula/node9.rb
git commit -m "chore: bump to v${{ steps.sha.outputs.version }}"
git push