From 9aa3d1ff551089e057787e8937c01b79ccff1463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Sun, 31 Dec 2023 11:17:31 -0800 Subject: [PATCH] Use Trusted Publishing on RubyGems.org --- .github/workflows/release.yml | 7 ++++--- sassc-embedded.gemspec | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6576b13..517fd25 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,6 +12,9 @@ jobs: runs-on: ubuntu-latest + permissions: + id-token: write + steps: - name: Checkout uses: actions/checkout@v4 @@ -24,6 +27,4 @@ jobs: ruby-version: ruby - name: Release - run: rake -f -r bundler/gem_tasks release - env: - GEM_HOST_API_KEY: ${{ secrets.GEM_HOST_API_KEY }} + uses: rubygems/release-gem@v1 diff --git a/sassc-embedded.gemspec b/sassc-embedded.gemspec index c10a783..53f88fa 100644 --- a/sassc-embedded.gemspec +++ b/sassc-embedded.gemspec @@ -2,7 +2,7 @@ require_relative 'lib/sassc/embedded/version' -Gem::Specification.new do |spec| # rubocop:disable Gemspec/RequireMFA +Gem::Specification.new do |spec| spec.name = 'sassc-embedded' spec.version = SassC::Embedded::VERSION spec.authors = ['なつき'] @@ -14,7 +14,8 @@ Gem::Specification.new do |spec| # rubocop:disable Gemspec/RequireMFA spec.metadata = { 'documentation_uri' => 'https://rubydoc.info/gems/sassc', 'source_code_uri' => "#{spec.homepage}/tree/v#{spec.version}", - 'funding_uri' => 'https://github.com/sponsors/ntkme' + 'funding_uri' => 'https://github.com/sponsors/ntkme', + 'rubygems_mfa_required' => 'true' } spec.files = Dir['lib/**/*.rb', 'vendor/github.com/sass/sassc-ruby/lib/**/*.rb'] + [