Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some deployment infrastructure #1198

Merged
merged 5 commits into from
Jan 12, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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.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