rename binary #10
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| release: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build | |
| run: make build | |
| - name: Create Release | |
| run: gh release create ${{ github.ref_name }} --generate-notes adaptive-scroll | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Update Homebrew Formula | |
| run: | | |
| git clone https://github.com/narasaka/homebrew-tap.git tap | |
| cd tap | |
| SHA256=$(shasum -a 256 ../adaptive-scroll | cut -d' ' -f1) | |
| sed -i '' "s|url .*|url \"https://github.com/narasaka/adaptive-scroll/releases/download/${{ github.ref_name }}/adaptive-scroll\"|" adaptive-scroll.rb | |
| sed -i '' "s|sha256 .*|sha256 \"$SHA256\"|" adaptive-scroll.rb | |
| sed -i '' "s|version .*|version \"${{ github.ref_name }}\"|" adaptive-scroll.rb | |
| git add adaptive-scroll.rb | |
| git commit -m "Update adaptive-scroll to ${{ github.ref_name }}" | |
| git remote set-url origin https://x-access-token:${{ secrets.HOMEBREW_TOKEN }}@github.com/narasaka/homebrew-tap.git | |
| git push | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |