Merge pull request #1863 from rubocop/release #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: Create a GitHub release | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
bundle exec rake create_release_notes | |
gh release create $(git tag --points-at @) \ | |
--title "RuboCop RSpec $(git tag --points-at @)" \ | |
--notes-file relnotes.md \ | |
- name: Replace version in Antora config | |
run: | | |
sed -i 's/version:.*$/version: ~/' docs/antora.yml | |
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 |