Skip to content

Commit

Permalink
Use Trusted Publishers for releasing gem
Browse files Browse the repository at this point in the history
  • Loading branch information
vu-hoang-kaligo committed Jan 7, 2025
1 parent 33efc8c commit ee67c7b
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,16 @@ on:
jobs:
build:
runs-on: ubuntu-latest

permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
contents: write # IMPORTANT: this permission is required for `rake release` to push the release tag

steps:
- uses: actions/checkout@v3
- name: Release Gem
uses: cadwallion/publish-rubygems-action@master
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}}
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: '3.4'
- uses: rubygems/release-gem@v1

0 comments on commit ee67c7b

Please sign in to comment.