Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 29 additions & 2 deletions .github/workflows/auto-merge-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,44 @@ permissions:
pull-requests: write

jobs:
auto-merge:
update-formula-and-merge:
runs-on: ubuntu-latest
if: |
github.event.pull_request.user.login == 'scala-steward-wvlet[bot]' &&
startsWith(github.event.pull_request.title, 'Release wvlet')

steps:
- name: Checkout repository
- name: Checkout PR
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Set VERSION env
run: |
VERSION=$(cat VERSION)
echo Version: $VERSION
echo "VERSION=$VERSION" >> $GITHUB_ENV

- name: Update formula
run: ./update-formula.sh > wvlet.rb

- name: Setup git
run: |
git config --global user.email "leo@xerial.org"
git config --global user.name "Taro L. Saito"
git config --global push.default simple

- name: Commit and push formula update
run: |
git add wvlet.rb
if ! git diff-index --quiet --cached HEAD; then
git commit -m "Update wvlet to ${VERSION} based on ${GITHUB_SHA}"
git push origin HEAD:${{ github.event.pull_request.head.ref }}
else
echo "No changes to commit"
fi

- name: Enable auto-merge
run: |
Expand Down
39 changes: 0 additions & 39 deletions .github/workflows/update-brew-formura.yml

This file was deleted.