Skip to content

Commit

Permalink
Add workflow to publish gem with trusted publishing
Browse files Browse the repository at this point in the history
Signed-off-by: Samuel Giddins <[email protected]>
  • Loading branch information
segiddins authored and simi committed Nov 15, 2024
1 parent 4dc73e7 commit 6c229d7
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/push_gem.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Push Gem

on:
release:
types:
- created

permissions:
contents: read

jobs:
push:
if: github.repository == 'rubygems/gems'
runs-on: ubuntu-latest

permissions:
contents: write
id-token: write

steps:
# Set up
- name: Harden Runner
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
with:
egress-policy: audit

- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Set up Ruby
uses: ruby/setup-ruby@cacc9f1c0b3f4eb8a16a6bb0ed10897b43b9de49 # v1.176.0
with:
bundler-cache: true
ruby-version: ruby

# Release
- uses: rubygems/release-gem@612653d273a73bdae1df8453e090060bb4db5f31 # v1

0 comments on commit 6c229d7

Please sign in to comment.