Skip to content

Commit

Permalink
Merge pull request #1864 from rubocop/improve-publish-workflow
Browse files Browse the repository at this point in the history
Publishing: Only push antora.yml if it's changed
  • Loading branch information
ydah authored Apr 5, 2024
2 parents d022102 + 31828f0 commit 536c9c3
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ jobs:
bundle exec rake create_release_notes
gh release create $(git tag --points-at @) \
--title "RuboCop RSpec $(git tag --points-at @)" \
--notes-file relnotes.md \
--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
if ! git diff --exit-code docs/antora.yml; then
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
fi

0 comments on commit 536c9c3

Please sign in to comment.