File tree Expand file tree Collapse file tree 9 files changed +59
-20
lines changed Expand file tree Collapse file tree 9 files changed +59
-20
lines changed Original file line number Diff line number Diff line change 1+ # This has to be a separate workflow to satisfy pub.dev's somewhat draconian
2+ # requirements for when and how GitHub actions are allowed publish packages.
3+ # Specifically, it requires that each publish action be triggered by a tag that
4+ # contains the version number for that action, so we can't just publish sass_api
5+ # as part of the standard sass release flow because that was triggered by a tag
6+ # with the sass version number.
7+ name : Release sass-api
8+
9+ on :
10+ push :
11+ tags : ['sass-api-[0-9]+.[0-9]+.*']
12+
13+ jobs :
14+ deploy_sass_api :
15+ if : github.event.repository.fork == false
16+ name : Deploy sass_api
17+ runs-on : ubuntu-latest
18+
19+ steps :
20+ - uses : actions/checkout@v4
21+ - uses : ./.github/util/initialize
22+ with : {github-token: "${{ github.token }}"}
23+
24+ - name : Deploy
25+ run : dart run grinder deploy-sass-api
26+ env :
27+ PUB_CREDENTIALS : " ${{ secrets.PUB_CREDENTIALS }}"
28+ GH_TOKEN : " ${{ secrets.GH_TOKEN }}"
29+ GH_USER : sassbot
Original file line number Diff line number Diff line change @@ -95,29 +95,25 @@ jobs:
9595
9696 steps :
9797 - uses : actions/checkout@v4
98+ with :
99+ # We have to use this rather than the implicit GitHub token so that
100+ # pushing a new tag triggers another action.
101+ token : ${{ secrets.GH_TOKEN }}
98102 - uses : ./.github/util/initialize
99103 with : {github-token: "${{ github.token }}"}
100104
101105 - name : Deploy
102106 run : dart run grinder protobuf pkg-pub-deploy
103107 env : {PUB_CREDENTIALS: "${{ secrets.PUB_CREDENTIALS }}"}
104108
105- deploy_sass_api :
106- name : Deploy sass_api
107- runs-on : ubuntu-latest
108- needs : [deploy_pub]
109-
110- steps :
111- - uses : actions/checkout@v4
112- - uses : ./.github/util/initialize
113- with : {github-token: "${{ github.token }}"}
114-
115- - name : Deploy
116- run : dart run grinder deploy-sass-api
117- env :
118- PUB_CREDENTIALS : " ${{ secrets.PUB_CREDENTIALS }}"
119- GH_TOKEN : " ${{ secrets.GH_TOKEN }}"
120- GH_USER : sassbot
109+ - name : Get Sass API version
110+ id : sass-api-version
111+ run : |
112+ echo "version=$(cat pkg/sass_api/pubspec.yaml | sed -nE 's/version: (.*)/\1/p')" | tee --append "$GITHUB_OUTPUT"
113+ # This should be /-separated rather than hyphenated, but pub.dev doesn't
114+ # currently allow that (dart-lang/pub-dev#8690).
115+ - run : git tag sass-api-${{ steps.sass-api-version.outputs.version }}
116+ - run : git push --tag
121117
122118 deploy_sass_parser :
123119 name : Deploy sass-parser
Original file line number Diff line number Diff line change 1+ ## 1.86.2
2+
3+ * No user-visible changes.
4+
15## 1.86.1
26
37* Improve the performance of ` file: ` URL case canonicalization on Windows and
Original file line number Diff line number Diff line change 1+ ## 0.4.18
2+
3+ * No user-visible changes.
4+
15## 0.4.17
26
37* No user-visible changes.
Original file line number Diff line number Diff line change 11{
22 "name" : " sass-parser" ,
3- "version" : " 0.4.17 " ,
3+ "version" : " 0.4.18 " ,
44 "description" : " A PostCSS-compatible wrapper of the official Sass parser" ,
55 "repository" : " sass/sass" ,
66 "author" : " Google Inc." ,
Original file line number Diff line number Diff line change 1+ ## 15.3.2
2+
3+ * No user-visible changes.
4+
15## 15.3.1
26
37* No user-visible changes.
Original file line number Diff line number Diff line change @@ -2,15 +2,15 @@ name: sass_api
22# Note: Every time we add a new Sass AST node, we need to bump the *major*
33# version because it's a breaking change for anyone who's implementing the
44# visitor interface(s).
5- version : 15.3.1
5+ version : 15.3.2
66description : Additional APIs for Dart Sass.
77homepage : https://github.com/sass/dart-sass
88
99environment :
1010 sdk : " >=3.6.0 <4.0.0"
1111
1212dependencies :
13- sass : 1.86.1
13+ sass : 1.86.2
1414
1515dev_dependencies :
1616 dartdoc : ^8.0.14
Original file line number Diff line number Diff line change 11name : sass
2- version : 1.86.1
2+ version : 1.86.2
33description : A Sass implementation in Dart.
44homepage : https://github.com/sass/dart-sass
55
Original file line number Diff line number Diff line change @@ -71,6 +71,8 @@ Future<void> deploySassApi() async {
7171 fail ("dart pub publish ${pubspec .name } failed" );
7272 }
7373
74+ // TODO(nweiz): Remove this when we use this tag to trigger the release
75+ // (blocked by dart-lang/pub-dev#8690).
7476 var response = await client.post (
7577 Uri .parse ("https://api.github.com/repos/sass/dart-sass/git/refs" ),
7678 headers: {
You can’t perform that action at this time.
0 commit comments