From 4721431dd38336582f5ce9f1da1d874c420ac2b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Tue, 31 Jan 2023 18:17:59 -0800 Subject: [PATCH 1/2] Update and lock sass_api version when releasing dart-sass-embedded --- .github/workflows/ci.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dfdbaed3b..644067bac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -487,13 +487,17 @@ jobs: - name: Get version id: version - run: echo "::set-output name=version::${GITHUB_REF##*/}" + run: | + echo "sass=${GITHUB_REF##*/}" | tee -a $GITHUB_OUTPUT + echo "sass_api=$(curl -fsSL https://raw.githubusercontent.com/sass/dart-sass/${GITHUB_REF##*/}/pkg/sass_api/pubspec.yaml | yq .version)" | tee -a $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 @@ -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 -fsSLo 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: sass.bot.beep.boop@gmail.com message: Update Dart Sass version and release - tag: ${{ steps.version.outputs.version }} + tag: ${{ steps.version.outputs.sass }} From cafc18300f5b72493b20d116d4c5d538428ce273 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Wed, 1 Feb 2023 17:30:20 -0800 Subject: [PATCH 2/2] Address review feedbacks --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 644067bac..bdb81411d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -488,8 +488,8 @@ jobs: - name: Get version id: version run: | - echo "sass=${GITHUB_REF##*/}" | tee -a $GITHUB_OUTPUT - echo "sass_api=$(curl -fsSL https://raw.githubusercontent.com/sass/dart-sass/${GITHUB_REF##*/}/pkg/sass_api/pubspec.yaml | yq .version)" | tee -a $GITHUB_OUTPUT + 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: | @@ -517,7 +517,7 @@ jobs: # make sure we're releasing against the latest version of all deps. dart pub upgrade - curl -fsSLo CHANGELOG.md https://raw.githubusercontent.com/sass/dart-sass/${{ steps.version.outputs.sass }}/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: