Skip to content

Commit

Permalink
Add automatic workflow for releasing a new version
Browse files Browse the repository at this point in the history
RubyGems has release a new feature that automates
releasing a new version! Found out about it on RailsConf 2024.

Source:
https://github.com/rubygems/configure_trusted_publisher
https://guides.rubygems.org/trusted-publishing/
  • Loading branch information
Stefanni Brasil committed May 8, 2024
1 parent 8462d26 commit fad7ac4
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/push_gem.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Push Gem

on:
workflow_dispatch:

permissions:
contents: read

jobs:
push:
if: github.repository == 'faker-ruby/faker'
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 fad7ac4

Please sign in to comment.