Skip to content

Commit a48041a

Browse files
authored
Merge pull request #2635 from sass/merge-main
Merge main into feature.v2
2 parents b0bfdfe + 473d83a commit a48041a

File tree

96 files changed

+922
-604
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+922
-604
lines changed

.github/util/initialize/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ runs:
4545
# downloading repo via GitHub API.
4646
- name: Check out the language repo
4747
if: github.event_name != 'pull_request'
48-
uses: actions/checkout@v4
48+
uses: actions/checkout@v5
4949
with: {repository: sass/sass, path: build/language}
5050

5151
- name: Generate Dart from protobuf

.github/workflows/build-linux.yml

Lines changed: 3 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,18 @@ jobs:
2121
- image: docker.io/library/dart
2222
platform: linux/amd64
2323
target: linux-x64
24-
- image: docker.io/library/dart
25-
platform: linux/amd64
26-
target: linux-ia32
2724
- image: docker.io/library/dart
2825
platform: linux/arm64
2926
target: linux-arm64
3027
- image: docker.io/library/dart
3128
platform: linux/arm/v7
3229
target: linux-arm
33-
- image: docker.io/library/debian:trixie-slim
30+
- image: docker.io/library/dart
3431
platform: linux/riscv64
3532
target: linux-riscv64
3633
- image: ghcr.io/dart-musl/dart
3734
platform: linux/amd64
3835
target: linux-x64-musl
39-
- image: ghcr.io/dart-musl/dart
40-
platform: linux/amd64
41-
target: linux-ia32-musl
4236
- image: ghcr.io/dart-musl/dart
4337
platform: linux/arm64
4438
target: linux-arm64-musl
@@ -51,9 +45,6 @@ jobs:
5145
- image: ghcr.io/dart-android/dart
5246
platform: linux/amd64
5347
target: android-x64
54-
- image: ghcr.io/dart-android/dart
55-
platform: linux/amd64
56-
target: android-ia32
5748
- image: ghcr.io/dart-android/dart
5849
platform: linux/arm64
5950
target: android-arm64
@@ -65,7 +56,7 @@ jobs:
6556
target: android-riscv64
6657

6758
steps:
68-
- uses: actions/checkout@v4
59+
- uses: actions/checkout@v5
6960

7061
- uses: ./.github/util/initialize
7162
with: {github-token: "${{ github.token }}"}
@@ -74,7 +65,7 @@ jobs:
7465
run: docker run --privileged --rm registry.fedoraproject.org/fedora-minimal /bin/sh -c "microdnf install --assumeyes --nodocs --setopt=install_weak_deps=False qemu-user-static systemd-udev && mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc && /usr/lib/systemd/systemd-binfmt --unregister && /usr/lib/systemd/systemd-binfmt"
7566

7667
- name: Build
77-
if: matrix.image != 'ghcr.io/dart-android/dart' && matrix.image != 'docker.io/library/debian:trixie-slim'
68+
if: matrix.image != 'ghcr.io/dart-android/dart'
7869
run: |
7970
docker run --rm -i \
8071
--platform ${{ matrix.platform }} \
@@ -102,35 +93,6 @@ jobs:
10293
dart run grinder pkg-standalone-${{ matrix.target }}
10394
EOF
10495
105-
# https://github.com/dart-lang/dart-docker/issues/96#issuecomment-1669860829
106-
# There is no official riscv64 dart container image yet, build on debian:trixie instead.
107-
# The setup is adopted from: https://github.com/dart-lang/dart-docker/blob/main/Dockerfile-debian.template
108-
- name: Build
109-
if: matrix.image == 'docker.io/library/debian:trixie-slim'
110-
run: |
111-
DART_CHANNEL=stable
112-
DART_VERSION=$(curl -fsSL https://storage.googleapis.com/dart-archive/channels/$DART_CHANNEL/release/latest/VERSION | yq .version)
113-
curl -fsSLO "https://storage.googleapis.com/dart-archive/channels/$DART_CHANNEL/release/$DART_VERSION/sdk/dartsdk-${{ matrix.target }}-release.zip"
114-
115-
docker run --rm -i \
116-
--platform ${{ matrix.platform }} \
117-
--volume "$PWD:$PWD" \
118-
--workdir "$PWD" \
119-
${{ matrix.image }} <<'EOF'
120-
set -e
121-
apt-get update
122-
apt-get install -y --no-install-recommends bind9-dnsutils ca-certificates curl git openssh-client unzip
123-
124-
export DART_SDK=/usr/lib/dart
125-
export PATH=$DART_SDK/bin:/root/.pub-cache/bin:$PATH
126-
127-
SDK="dartsdk-${{ matrix.target }}-release.zip"
128-
unzip "$SDK" && mv dart-sdk "$DART_SDK" && rm "$SDK"
129-
130-
dart pub get
131-
dart run grinder pkg-standalone-${{ matrix.target }}
132-
EOF
133-
13496
- name: Generate artifact attestation
13597
if: github.ref_type == 'tag'
13698
uses: actions/attest-build-provenance@v2

.github/workflows/build-macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
runner: macos-latest
2525

2626
steps:
27-
- uses: actions/checkout@v4
27+
- uses: actions/checkout@v5
2828

2929
- uses: ./.github/util/initialize
3030
with: {github-token: "${{ github.token }}"}

.github/workflows/build-windows.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,11 @@ jobs:
2020
include:
2121
- arch: x64
2222
runner: windows-latest
23-
- arch: ia32
24-
runner: windows-latest
2523
- arch: arm64
26-
runner: windows-arm64
24+
runner: windows-11-arm
2725

2826
steps:
29-
- uses: actions/checkout@v4
27+
- uses: actions/checkout@v5
3028

3129
- uses: ./.github/util/initialize
3230
with: {github-token: "${{ github.token }}"}

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
if: "github.ref_type == 'tag' && github.event.repository.fork == false"
1919

2020
steps:
21-
- uses: actions/checkout@v4
21+
- uses: actions/checkout@v5
2222
- uses: ./.github/util/initialize
2323
with: {github-token: "${{ github.token }}"}
2424

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

.github/workflows/release.yml

Lines changed: 22 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
needs: [build_linux, build_macos, build_windows]
3232

3333
steps:
34-
- uses: actions/checkout@v4
34+
- uses: actions/checkout@v5
3535
- uses: ./.github/util/initialize
3636
with: {github-token: "${{ github.token }}"}
3737

@@ -63,7 +63,7 @@ jobs:
6363
runs-on: ubuntu-latest
6464

6565
steps:
66-
- uses: actions/checkout@v4
66+
- uses: actions/checkout@v5
6767
- uses: ./.github/util/initialize
6868
with: {github-token: "${{ github.token }}"}
6969

@@ -73,59 +73,39 @@ jobs:
7373
UPDATE_SASS_SASS_REPO: false
7474
NPM_TOKEN: "${{ secrets.NPM_TOKEN }}"
7575

76-
deploy_bazel:
77-
name: Deploy Bazel
78-
runs-on: ubuntu-latest
79-
needs: [deploy_npm]
80-
81-
steps:
82-
- uses: actions/checkout@v4
83-
- uses: ./.github/util/initialize
84-
with: {github-token: "${{ github.token }}"}
85-
86-
- name: Deploy
87-
run: dart run grinder update-bazel
88-
env:
89-
GH_TOKEN: "${{ secrets.GH_TOKEN }}"
90-
GH_USER: sassbot
91-
9276
deploy_pub:
9377
name: Deploy Pub
9478
runs-on: ubuntu-latest
9579

9680
steps:
97-
- uses: actions/checkout@v4
81+
- uses: actions/checkout@v5
82+
with:
83+
# We have to use this rather than the implicit GitHub token so that
84+
# pushing a new tag triggers another action.
85+
token: ${{ secrets.GH_TOKEN }}
9886
- uses: ./.github/util/initialize
9987
with: {github-token: "${{ github.token }}"}
10088

10189
- name: Deploy
10290
run: dart run grinder protobuf pkg-pub-deploy
10391
env: {PUB_CREDENTIALS: "${{ secrets.PUB_CREDENTIALS }}"}
10492

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
93+
- name: Get Sass API version
94+
id: sass-api-version
95+
run: |
96+
echo "version=$(cat pkg/sass_api/pubspec.yaml | sed -nE 's/version: (.*)/\1/p')" | tee --append "$GITHUB_OUTPUT"
97+
# This should be /-separated rather than hyphenated, but pub.dev doesn't
98+
# currently allow that (dart-lang/pub-dev#8690).
99+
- run: git tag sass-api-${{ steps.sass-api-version.outputs.version }}
100+
- run: git push --tag
121101

122102
deploy_sass_parser:
123103
name: Deploy sass-parser
124104
runs-on: ubuntu-latest
125105
needs: [deploy_npm]
126106

127107
steps:
128-
- uses: actions/checkout@v4
108+
- uses: actions/checkout@v5
129109
with:
130110
token: ${{ secrets.GH_TOKEN }}
131111
# Set up .npmrc file to publish to npm
@@ -162,7 +142,7 @@ jobs:
162142
runs-on: ubuntu-latest
163143

164144
steps:
165-
- uses: actions/checkout@v4
145+
- uses: actions/checkout@v5
166146
- uses: dart-lang/setup-dart@v1
167147
- run: dart pub get
168148

@@ -177,7 +157,7 @@ jobs:
177157
runs-on: windows-latest
178158

179159
steps:
180-
- uses: actions/checkout@v4
160+
- uses: actions/checkout@v5
181161
- uses: ./.github/util/initialize
182162
with: {github-token: "${{ github.token }}"}
183163

@@ -191,7 +171,7 @@ jobs:
191171
needs: [deploy_npm]
192172

193173
steps:
194-
- uses: actions/checkout@v4
174+
- uses: actions/checkout@v5
195175
with:
196176
repository: sass/sass-site
197177
token: ${{ secrets.SASS_SITE_TOKEN }}
@@ -219,7 +199,7 @@ jobs:
219199
needs: [deploy_github]
220200

221201
steps:
222-
- uses: actions/checkout@v4
202+
- uses: actions/checkout@v5
223203
with:
224204
repository: sass/embedded-host-node
225205
token: ${{ secrets.GH_TOKEN }}
@@ -236,7 +216,8 @@ jobs:
236216
for dir in $(ls npm); do
237217
cat "npm/$dir/package.json" |
238218
jq --arg version ${{ steps.version.outputs.version }} '
239-
.version |= $version
219+
.version |= $version |
220+
if (.dependencies.sass) then .dependencies.sass |= $version end
240221
' > package.json.tmp &&
241222
mv package.json.tmp "npm/$dir/package.json"
242223
done

.github/workflows/test-vendor.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
bootstrap_version: [4, 5]
1616

1717
steps:
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v5
1919
- uses: ./.github/util/initialize
2020
with: {github-token: "${{ github.token }}"}
2121

@@ -29,7 +29,7 @@ jobs:
2929
runs-on: ubuntu-latest
3030

3131
steps:
32-
- uses: actions/checkout@v4
32+
- uses: actions/checkout@v5
3333
- uses: ./.github/util/initialize
3434
with: {github-token: "${{ github.token }}"}
3535

@@ -45,7 +45,7 @@ jobs:
4545
runs-on: ubuntu-latest
4646

4747
steps:
48-
- uses: actions/checkout@v4
48+
- uses: actions/checkout@v5
4949
- uses: ./.github/util/initialize
5050
with: {github-token: "${{ github.token }}"}
5151

@@ -62,7 +62,7 @@ jobs:
6262
runs-on: ubuntu-latest
6363

6464
steps:
65-
- uses: actions/checkout@v4
65+
- uses: actions/checkout@v5
6666
- uses: ./.github/util/initialize
6767
with: {github-token: "${{ github.token }}"}
6868

0 commit comments

Comments
 (0)