Skip to content

Commit

Permalink
fix(ruby): release using Trusted Publishing
Browse files Browse the repository at this point in the history
algolia/api-clients-automation#2504

Co-authored-by: Pierre Millot <pierre.millot@algolia.com>
  • Loading branch information
algolia-bot and millotp committed Jan 9, 2024
1 parent 5e026a6 commit 9e3c9f0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Release

# This file is registered in https://rubygems.org/gems/algolia/trusted_publishers to be able to publish new versions of the gem.

on:
push:
branches:
Expand All @@ -12,6 +14,7 @@ jobs:
if: "startsWith(github.event.head_commit.message, 'chore: release')"
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v4

Expand All @@ -21,8 +24,4 @@ jobs:
ruby-version: 3.2.2
bundler-cache: true

- name: Build gem
run: gem build algolia.gemspec

- name: Publish new gem
run: gem push --key ${{ secrets.RUBYGEMS_API_KEY }} $(ls algolia-*.gem)
- uses: rubygems/release-gem@v1

0 comments on commit 9e3c9f0

Please sign in to comment.