Skip to content

Commit ce6751f

Browse files
authored
Use trusted publisher (#83)
* Use trusted publisher * Bump ruby version * Bump version and use release-gem
1 parent 4ae3e09 commit ce6751f

File tree

4 files changed

+11
-12
lines changed

4 files changed

+11
-12
lines changed

.github/workflows/publish.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ on:
33
release:
44
types: [created]
55

6+
permissions:
7+
id-token: write # Required for OIDC
8+
deployments: write
9+
contents: read
10+
611
jobs:
712
publish:
813
name: Publish
@@ -23,12 +28,9 @@ jobs:
2328
environment: production
2429

2530
- name: Setup Ruby
26-
uses: ruby/setup-ruby@1a615958ad9d422dd932dc1d5823942ee002799f # v1.227.0
31+
uses: ruby/setup-ruby@v1
2732
with:
28-
ruby-version: 2.7.1
29-
30-
- name: Build Gem
31-
run: gem build -o patch_ruby.gem patch_ruby.gemspec
33+
ruby-version: 3.4.3
3234

3335
- name: Install Ruby Dependencies
3436
run: bundle install
@@ -38,10 +40,7 @@ jobs:
3840
SANDBOX_API_KEY: ${{ secrets.SANDBOX_API_KEY }}
3941
run: bundle exec rspec
4042

41-
- name: Push to RubyGems
42-
env:
43-
GEM_HOST_API_KEY: ${{ secrets.GEM_HOST_API_KEY }}
44-
run: gem push patch_ruby.gem
43+
- uses: rubygems/release-gem@v1
4544

4645
- name: Update deployment status (success)
4746
if: success()

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
patch_ruby (2.6.0)
4+
patch_ruby (2.6.1)
55
typhoeus (~> 1.0, >= 1.0.1)
66

77
GEM

lib/patch_ruby/api_client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class ApiClient
3131
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
3232
def initialize(config = Configuration.default)
3333
@config = config
34-
@user_agent = "patch-ruby/2.6.0"
34+
@user_agent = "patch-ruby/2.6.1"
3535
@default_headers = {
3636
'Content-Type' => 'application/json',
3737
'User-Agent' => @user_agent

lib/patch_ruby/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
=end
1212

1313
module Patch
14-
VERSION = '2.6.0'
14+
VERSION = '2.6.1'
1515
end

0 commit comments

Comments
 (0)