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

Update and lock sass_api version when releasing dart-sass-embedded #1878

Merged
merged 2 commits into from
Feb 6, 2023
Merged
Changes from all 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
14 changes: 9 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -487,13 +487,17 @@ jobs:

- name: Get version
id: version
run: echo "::set-output name=version::${GITHUB_REF##*/}"
run: |
echo "sass=${GITHUB_REF##*/}" | tee --append $GITHUB_OUTPUT
echo "sass_api=$(curl --fail --silent --show-error --location https://raw.githubusercontent.com/sass/dart-sass/${GITHUB_REF##*/}/pkg/sass_api/pubspec.yaml | yq .version)" | tee --append $GITHUB_OUTPUT

- name: Update version
run: |
sed -i 's/version: .*/version: ${{ steps.version.outputs.version }}/' pubspec.yaml
sed -i 's/version: .*/version: ${{ steps.version.outputs.sass }}/' pubspec.yaml
dart pub remove sass_api
dart pub remove sass
dart pub add sass:${{ steps.version.outputs.version }}
dart pub add sass:${{ steps.version.outputs.sass }}
dart pub add sass_api:^${{ steps.version.outputs.sass_api }}

# Delete a dependency override on Sass if it exists, and delete the
# dependency_overrides field if it's now empty. The embedded compiler
Expand All @@ -513,11 +517,11 @@ jobs:
# make sure we're releasing against the latest version of all deps.
dart pub upgrade

curl https://raw.githubusercontent.com/sass/dart-sass/${{ steps.version.outputs.version }}/CHANGELOG.md > CHANGELOG.md
curl --fail --silent --show-error --location --output CHANGELOG.md https://raw.githubusercontent.com/sass/dart-sass/${{ steps.version.outputs.sass }}/CHANGELOG.md

- uses: EndBug/add-and-commit@v8
with:
author_name: Sass Bot
author_email: [email protected]
message: Update Dart Sass version and release
tag: ${{ steps.version.outputs.version }}
tag: ${{ steps.version.outputs.sass }}