Skip to content

Commit

Permalink
Switch to RubyGems Trusted publishing in CI release workflow [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
Envek committed Jan 4, 2024
1 parent 327dbe5 commit de75438
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@ on:
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
packages: write
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch current tag as annotated. See https://github.com/actions/checkout/issues/290
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
ruby-version: "3.3"
- name: "Extract data from tag: version, message, body"
id: tag
run: |
Expand Down Expand Up @@ -75,8 +79,8 @@ jobs:
GEM_HOST_API_KEY: Bearer ${{ secrets.GITHUB_TOKEN }}
run: |
gem push after_commit_everywhere-${{ steps.tag.outputs.version }}.gem --host https://rubygems.pkg.github.com/${{ github.repository_owner }}
- name: Configure RubyGems Credentials
uses: rubygems/configure-rubygems-credentials@main
- name: Publish to RubyGems
env:
GEM_HOST_API_KEY: "${{ secrets.RUBYGEMS_API_KEY }}"
run: |
gem push after_commit_everywhere-${{ steps.tag.outputs.version }}.gem

0 comments on commit de75438

Please sign in to comment.