Skip to content

Commit 15f3b07

Browse files
committed
Switch to RubyGems Trusted publishing in CI release workflow [ci skip]
1 parent fbe9975 commit 15f3b07

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/build-release.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,17 @@ on:
88
jobs:
99
release:
1010
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
id-token: write
14+
packages: write
1115
steps:
12-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v4
1317
with:
1418
fetch-depth: 0 # Fetch current tag as annotated. See https://github.com/actions/checkout/issues/290
1519
- uses: ruby/setup-ruby@v1
1620
with:
17-
ruby-version: 2.7
21+
ruby-version: "3.4"
1822
- name: "Extract data from tag: version, message, body"
1923
id: tag
2024
run: |
@@ -75,8 +79,8 @@ jobs:
7579
GEM_HOST_API_KEY: Bearer ${{ secrets.GITHUB_TOKEN }}
7680
run: |
7781
gem push yabeda-http_requests-${{ steps.tag.outputs.version }}.gem --host https://rubygems.pkg.github.com/${{ github.repository_owner }}
82+
- name: Configure RubyGems Credentials
83+
uses: rubygems/configure-rubygems-credentials@main
7884
- name: Publish to RubyGems
79-
env:
80-
GEM_HOST_API_KEY: "${{ secrets.RUBYGEMS_API_KEY }}"
8185
run: |
8286
gem push yabeda-http_requests-${{ steps.tag.outputs.version }}.gem

0 commit comments

Comments
 (0)