diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e488eb9a..d69db27a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -302,6 +302,22 @@ jobs: run: dart run grinder pkg-github-${{ matrix.platform }} env: {GH_BEARER_TOKEN: "${{ github.token }}"} + deploy_homebrew: + name: "Deploy Homebrew" + runs-on: ubuntu-latest + needs: [dart_tests, sass_spec, static_analysis, format] + if: "startsWith(github.ref, 'refs/tags/') && github.repository == 'sass/dart-sass-embedded'" + + steps: + - uses: actions/checkout@v2 + - uses: dart-lang/setup-dart@v1 + - run: dart pub get + - name: Deploy + run: dart pub run grinder pkg-homebrew-update + env: + GH_TOKEN: "${{ secrets.GH_TOKEN }}" + GH_USER: sassbot + release_embedded_host: name: "Release Embedded Host" runs-on: ubuntu-latest diff --git a/tool/grind.dart b/tool/grind.dart index e4a7290c..91477a98 100644 --- a/tool/grind.dart +++ b/tool/grind.dart @@ -11,7 +11,15 @@ import 'package:yaml/yaml.dart'; import 'utils.dart'; void main(List args) { + pkg.humanName.value = "Dart Sass Embedded"; + pkg.botName.value = "Sass Bot"; + pkg.botEmail.value = "sass.bot.beep.boop@gmail.com"; + pkg.homebrewRepo.value = "sass/homebrew-sass"; + pkg.homebrewFormula.value = "dart-sass-embedded.rb"; + pkg.githubBearerToken.fn = () => Platform.environment["GH_BEARER_TOKEN"]!; + pkg.githubUser.fn = () => Platform.environment["GH_USER"]; + pkg.githubPassword.fn = () => Platform.environment["GH_TOKEN"]; pkg.environmentConstants.fn = () => { ...pkg.environmentConstants.defaultValue, @@ -22,6 +30,7 @@ void main(List args) { }; pkg.addGithubTasks(); + pkg.addHomebrewTasks(); grind(args); }