From 006ac892035c2ff9828b3f45fd27f56061835dd5 Mon Sep 17 00:00:00 2001 From: Ronald Tse Date: Mon, 19 Oct 2026 21:41:21 +0800 Subject: [PATCH 1/2] ci: release this repo's gem via trusted publishing release.yml still targeted the old interscript monorepo (checkout + bootstrap + monorepo ruby/js packages), which can never publish this gem and has failed on every tag. Release the gem from this repo: self-checkout, spec run, then rubygems/release-gem (OIDC). bundler's rake release aborts when the v* tag already exists, so the release task is hand-rolled to push the built gem directly. --- .github/workflows/release.yml | 43 +++++------------------------------ Rakefile | 8 +++++++ 2 files changed, 14 insertions(+), 37 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 192423bc..69cc8b6a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,46 +8,15 @@ on: jobs: release: runs-on: ubuntu-latest + permissions: + id-token: write # RubyGems.org trusted publishing (OIDC) + contents: write steps: - - name: Checkout monorepo - uses: actions/checkout@v7 - with: - repository: interscript/interscript - - - name: Bootstrap packages - run: ruby bootstrap.rb - - - uses: actions/setup-node@v7 - with: - node-version: '22' - cache: npm - cache-dependency-path: js/package-lock.json - + - uses: actions/checkout@v7 - uses: ruby/setup-ruby@v1 with: ruby-version: '3.3' bundler-cache: true - working-directory: ruby - - - name: Install gems - working-directory: ruby - run: bundle install --jobs 4 --retry 3 --with jsexec - - - name: Test Ruby package - working-directory: ruby + - name: Test run: bundle exec rake - - - name: Test JS package - working-directory: js - run: npm install && npm run prepareMaps && npm test - - - name: Publish to rubygems.org - env: - RUBYGEMS_API_KEY: ${{ secrets.INTERSCRIPT_RUBYGEMS_API_KEY }} - working-directory: ruby - run: | - mkdir -p ~/.gem - printf -- "---\n:rubygems_api_key: %s\n" "$RUBYGEMS_API_KEY" > ~/.gem/credentials - chmod 0600 ~/.gem/credentials - gem install gem-release - gem release + - uses: rubygems/release-gem@v1 diff --git a/Rakefile b/Rakefile index 0f8e4ad6..db5226fe 100644 --- a/Rakefile +++ b/Rakefile @@ -142,3 +142,11 @@ task :generate_authority_json do end task default: :spec + +# bundler's release task aborts when the v* tag already exists; push the +# built gem directly (rubygems/release-gem exports the OIDC-derived key). +Rake::Task["release"].clear +task release: :build do + require "interscript/version" + sh "gem push pkg/interscript-#{Interscript::VERSION}.gem" +end From 50fc3239449a5a8f1027bff4834c564c1517d907 Mon Sep 17 00:00:00 2001 From: Ronald Tse Date: Mon, 19 Oct 2026 21:41:22 +0800 Subject: [PATCH 2/2] release: bump to 3.2.0 (Interscript::ML neural layer ships in the gem) --- lib/interscript/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/interscript/version.rb b/lib/interscript/version.rb index c45cf4e0..5cfccfc6 100644 --- a/lib/interscript/version.rb +++ b/lib/interscript/version.rb @@ -1,3 +1,3 @@ module Interscript - VERSION = "3.1.0" + VERSION = "3.2.0" end