Skip to content

Commit

Permalink
Delete dev dependency on Sass when releasing the embedded compiler (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
nex3 authored Dec 16, 2022
1 parent 641d8e1 commit 236b83f
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,8 @@ jobs:
repository: sass/dart-sass-embedded
token: ${{ secrets.GH_TOKEN }}
- uses: dart-lang/setup-dart@v1
- uses: frenck/action-setup-yq@v1
with: {version: v4.30.5} # frenck/action-setup-yq#35

- name: Get version
id: version
Expand All @@ -492,6 +494,25 @@ jobs:
sed -i 's/version: .*/version: ${{ steps.version.outputs.version }}/' pubspec.yaml
dart pub remove sass
dart pub add sass:${{ steps.version.outputs.version }}
# Delete a dependency override on Sass if it exists, and delete the
# dependency_overrides field if it's now empty. The embedded compiler
# often uses dev dependencies to run against the latest Dart Sass, but
# once we release the latest version that's no longer necessary.
#
# TODO(dart-lang/pub#3700): Use pub for this instead to avoid removing
# blank lines. See also mikefarah/yq#515.
yq -i '
del(.dependency_overrides.sass) |
to_entries |
map(select(.key != "dependency_overrides" or (.value | length >0))) |
from_entries
' pubspec.yaml
# The embedded compiler has a checked-in pubspec.yaml, so upgrade to
# make sure we're releasing against the latest version of all deps.
pub upgrade
curl https://raw.githubusercontent.com/sass/dart-sass/${{ steps.version.outputs.version }}/CHANGELOG.md > CHANGELOG.md
- uses: EndBug/add-and-commit@v8
Expand Down

0 comments on commit 236b83f

Please sign in to comment.