Skip to content

Commit e9cd0bb

Browse files
committed
Verify artifact attestations for dart-sass
1 parent e2cd170 commit e9cd0bb

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ jobs:
179179
180180
- name: Compile
181181
run: bundle exec rake compile
182+
env:
183+
GH_TOKEN: ${{ github.token }}
182184

183185
- name: Spec
184186
if: "!matrix.vm || contains(matrix.vm.run, 'linux_base') || contains(matrix.vm.run, '/proc')" # TODO: remove after https://github.com/sass/dart-sass/pull/2413

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ jobs:
6868

6969
- name: Compile
7070
run: bundle exec rake compile ext_platform=${{ matrix.platform }}
71+
env:
72+
GH_TOKEN: ${{ github.token }}
7173

7274
- name: Build
7375
run: rake -f -r bundler/gem_tasks build gem_platform=${{ matrix.platform }}

ext/sass/Rakefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ file 'dart-sass/sass' do
5050
end
5151
rescue StandardError
5252
archive = fetch(SassConfig.dart_sass)
53+
if SassConfig.development? && system('gh', 'auth', 'status', '--hostname', 'github.com', %i[out err] => File::NULL)
54+
sh 'gh', 'attestation', 'verify', archive, '--hostname', 'github.com', '--repo', 'sass/dart-sass'
55+
end
5356
unarchive archive
5457
rm archive
5558
end

0 commit comments

Comments
 (0)