Skip to content

ci: use trusted publishing (OIDC) for RubyGems push #2

ci: use trusted publishing (OIDC) for RubyGems push

ci: use trusted publishing (OIDC) for RubyGems push #2

Workflow file for this run

name: Publish Gem
on:
push:
tags:
- "v*.*.*"
jobs:
publish:
name: Push to RubyGems
runs-on: ubuntu-latest
environment: rubygems
permissions:
contents: read
id-token: write # for trusted publishing (rubygems OIDC)
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
bundler-cache: true
- name: Run tests before publishing
run: bundle exec rake test
- name: Build gem
run: gem build octaspace.gemspec
- name: Push to RubyGems
uses: rubygems/release-gem@v1