Skip to content

Commit

Permalink
Merge pull request #1198 from sass/deploy
Browse files Browse the repository at this point in the history
Fix some deployment infrastructure
  • Loading branch information
nex3 authored Jan 12, 2021
2 parents b9f3132 + 19555e9 commit e97dd1a
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,9 @@ jobs:
with: {node-version: "${{ env.DEFAULT_NODE_VERSION }}"}
- name: Deploy
run: dart pub run grinder update-bazel
env:
GH_TOKEN: "${{ secrets.GH_TOKEN }}"
GH_USER: sassbot

deploy_pub:
name: "Deploy Pub"
Expand Down Expand Up @@ -255,7 +258,7 @@ jobs:
name: "Deploy Chocolatey"
runs-on: windows-latest
needs: [sanity_checks]
if: "startsWith('refs/tags/', github.ref) && github.repository == 'sass/dart-sass'"
if: "startsWith(github.ref, 'refs/tags/') && github.repository == 'sass/dart-sass'"

steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.32.4

* No user-visible changes.

## 1.32.3

* Optimize `==` for numbers that have different units.
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: sass
version: 1.32.3
version: 1.32.4
description: A Sass implementation in Dart.
author: Sass Team
homepage: https://github.com/sass/dart-sass
Expand Down
14 changes: 11 additions & 3 deletions tool/grind/bazel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,15 @@ Future<void> updateBazel() async {
.readAsStringSync()
.replaceFirst(RegExp(r'"sass": "[^"]+"'), '"sass": "${pkg.version}"'));

run("yarn", workingDirectory: p.join(repo, "sass"));
try {
run("yarn", workingDirectory: p.join(repo, "sass"));
} on ProcessException catch (error) {
if (error.stderr.contains("Couldn't find any versions for \"sass\"")) {
log("The new sass version doesn't seem to be available yet, waiting 10s...");
await Future<void>.delayed(Duration(seconds: 10));
run("yarn", workingDirectory: p.join(repo, "sass"));
}
}

run("git",
arguments: [
Expand All @@ -41,8 +49,8 @@ Future<void> updateBazel() async {
workingDirectory: repo,
runOptions: sassBotEnvironment);

var username = environment('GITHUB_USER');
var password = environment('GITHUB_TOKEN');
var username = environment('GH_USER');
var password = environment('GH_TOKEN');
await runAsync("git",
arguments: [
"push",
Expand Down

0 comments on commit e97dd1a

Please sign in to comment.