build: Automate bumping starship brew formula

This commit is contained in:
Matan Kushner 2019-12-13 14:22:38 -05:00
parent b2ebd24506
commit 7ab473c88c
No known key found for this signature in database
GPG Key ID: 4B98C3A8949CA8A4
1 changed files with 17 additions and 2 deletions

View File

@ -127,7 +127,7 @@ jobs:
# Install PHP at a fixed version # Install PHP at a fixed version
- uses: shivammathur/setup-php@master - uses: shivammathur/setup-php@master
with: with:
php-version: '7.3.8' php-version: "7.3.8"
# Install Mercurial (pre-installed on linux, installed from pip on macos # Install Mercurial (pre-installed on linux, installed from pip on macos
# and from choco on windows), # and from choco on windows),
@ -187,6 +187,21 @@ jobs:
env: env:
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
update_brew_formula:
if: startsWith(github.ref, 'refs/tags/v')
name: Update Brew Formula
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- run: |
echo "https://starship-bot:$GITHUB_TOKEN@github.com" > ~/.git-credentials
git config --global credential.helper store
git config --global user.name "Starship Bot"
git config --global user.email "bot@starship.rs"
brew bump-formula-pr --url=https://github.com/starship/starship/archive/$(git describe --tags).tar.gz --message="Automated release pull request using continuous integration." --no-browse -v starship --force
env:
GITHUB_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
# Build sources for every OS # Build sources for every OS
github_build: github_build:
if: startsWith(github.ref, 'refs/tags/v') if: startsWith(github.ref, 'refs/tags/v')