Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor cleanup on the publish RubyGems action #7337

Merged
merged 1 commit into from
May 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions .github/workflows/gems-release-to-rubygems.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
name: Gems - Release to RubyGems
on:
release:
# It's fine to trigger on every release because if we tag a release w/o
# bumping the Gem version, RubyGems will reject it with an error that the
# version is already live.
types: [published]
permissions:
contents: read

jobs:
release-gems:
name: Release gems to rubygems.org
runs-on: ubuntu-latest

permissions:
contents: read

steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
- run: |
[ -d ~/.gem ] || mkdir ~/.gem
echo "---" > ~/.gem/credentials
echo ":rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }}" > ~/.gem/credentials
echo ":rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY_WITH_SCOPE_LIMITED_TO_PUSH }}" > ~/.gem/credentials
jeffwidman marked this conversation as resolved.
Show resolved Hide resolved
chmod 0600 ~/.gem/credentials
gem install rake && rake gems:release