Skip to content
This repository was archived by the owner on May 15, 2023. It is now read-only.

Commit dfd4432

Browse files
ntkmenex3
andauthored
Auto-update homebrew formula on release (#122)
Co-authored-by: Natalie Weizenbaum <[email protected]>
1 parent bec6b3d commit dfd4432

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,22 @@ jobs:
302302
run: dart run grinder pkg-github-${{ matrix.platform }}
303303
env: {GH_BEARER_TOKEN: "${{ github.token }}"}
304304

305+
deploy_homebrew:
306+
name: "Deploy Homebrew"
307+
runs-on: ubuntu-latest
308+
needs: [dart_tests, sass_spec, static_analysis, format]
309+
if: "startsWith(github.ref, 'refs/tags/') && github.repository == 'sass/dart-sass-embedded'"
310+
311+
steps:
312+
- uses: actions/checkout@v2
313+
- uses: dart-lang/setup-dart@v1
314+
- run: dart pub get
315+
- name: Deploy
316+
run: dart pub run grinder pkg-homebrew-update
317+
env:
318+
GH_TOKEN: "${{ secrets.GH_TOKEN }}"
319+
GH_USER: sassbot
320+
305321
release_embedded_host:
306322
name: "Release Embedded Host"
307323
runs-on: ubuntu-latest

tool/grind.dart

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,15 @@ import 'package:yaml/yaml.dart';
1111
import 'utils.dart';
1212

1313
void main(List<String> args) {
14+
pkg.humanName.value = "Dart Sass Embedded";
15+
pkg.botName.value = "Sass Bot";
16+
pkg.botEmail.value = "[email protected]";
17+
pkg.homebrewRepo.value = "sass/homebrew-sass";
18+
pkg.homebrewFormula.value = "dart-sass-embedded.rb";
19+
1420
pkg.githubBearerToken.fn = () => Platform.environment["GH_BEARER_TOKEN"]!;
21+
pkg.githubUser.fn = () => Platform.environment["GH_USER"];
22+
pkg.githubPassword.fn = () => Platform.environment["GH_TOKEN"];
1523

1624
pkg.environmentConstants.fn = () => {
1725
...pkg.environmentConstants.defaultValue,
@@ -22,6 +30,7 @@ void main(List<String> args) {
2230
};
2331

2432
pkg.addGithubTasks();
33+
pkg.addHomebrewTasks();
2534
grind(args);
2635
}
2736

0 commit comments

Comments
 (0)