Skip to content

Commit 9e32f66

Browse files
committed
Fix the sass_api release
Pub.dev just launched an update that requires GitHub publish actions to be run from a tag that matches the version number of the published package.
1 parent cee843b commit 9e32f66

File tree

8 files changed

+57
-20
lines changed

8 files changed

+57
-20
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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+
permissions:
17+
attestations: write
18+
contents: write
19+
id-token: write
20+
name: Deploy sass_api
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
- uses: ./.github/util/initialize
26+
with: {github-token: "${{ github.token }}"}
27+
28+
- name: Deploy
29+
run: dart run grinder deploy-sass-api
30+
env:
31+
PUB_CREDENTIALS: "${{ secrets.PUB_CREDENTIALS }}"
32+
GH_TOKEN: "${{ secrets.GH_TOKEN }}"
33+
GH_USER: sassbot

.github/workflows/release.yml

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -102,22 +102,14 @@ jobs:
102102
run: dart run grinder protobuf pkg-pub-deploy
103103
env: {PUB_CREDENTIALS: "${{ secrets.PUB_CREDENTIALS }}"}
104104

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
105+
- name: Get Sass API version
106+
id: sass-api-version
107+
run: |
108+
echo "version=$(cat pkg/sass_api/pubspec.yaml | sed -nE 's/version: (.*)/\1/p')" | tee --append "$GITHUB_OUTPUT"
109+
# This should be /-separated rather than hyphenated, but pub.dev doesn't
110+
# currently allow that (dart-lang/pub-dev#8690).
111+
- run: git tag sass-api-${{ steps.sass-api-version.outputs.version }}
112+
- run: git push --tag
121113

122114
deploy_sass_parser:
123115
name: Deploy sass-parser

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
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

pkg/sass-parser/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.4.18
2+
3+
* No user-visible changes.
4+
15
## 0.4.17
26

37
* No user-visible changes.

pkg/sass-parser/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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.",

pkg/sass_api/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 15.3.2
2+
3+
* No user-visible changes.
4+
15
## 15.3.1
26

37
* No user-visible changes.

pkg/sass_api/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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
66
description: Additional APIs for Dart Sass.
77
homepage: https://github.com/sass/dart-sass
88

99
environment:
1010
sdk: ">=3.6.0 <4.0.0"
1111

1212
dependencies:
13-
sass: 1.86.1
13+
sass: 1.86.2
1414

1515
dev_dependencies:
1616
dartdoc: ^8.0.14

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: sass
2-
version: 1.86.1
2+
version: 1.86.2
33
description: A Sass implementation in Dart.
44
homepage: https://github.com/sass/dart-sass
55

0 commit comments

Comments
 (0)