Skip to content

Commit

Permalink
Use Rubygems Trusted Publishers to publish
Browse files Browse the repository at this point in the history
Fix: #1827
  • Loading branch information
ydah committed Apr 1, 2024
1 parent 447fa4e commit bdc6644
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Publish
on:
push:
branches: master
paths: lib/rubocop/rspec/version.rb
jobs:
publish:
name: Publish to RubyGems
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: ruby
- uses: rubygems/release-gem@v1
- name: Replace version in Antora config
run: |
sed -i 's/version:.*$/version: ~/' docs/antora.yml
- name: Commit version change
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git add docs/antora.yml
git commit -m "Switch docs version back"
git push

0 comments on commit bdc6644

Please sign in to comment.