-
Notifications
You must be signed in to change notification settings - Fork 161
Automated Releases #252
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
Automated Releases #252
Conversation
…s and GitHub Packages
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This pull request automates the release process for the rubocop-github project by introducing workflows that build, test, lint, and release the gem to RubyGems and GitHub Packages. Key changes include:
- Addition of a build workflow (.github/workflows/build.yml) that builds the gem.
- Introduction of a release workflow (.github/workflows/release.yml) that sets the gem’s version, publishes the gem, and releases it on GitHub.
- Addition of a lint workflow (.github/workflows/lint.yml) and updates to the CI workflow (.github/workflows/ci.yml).
- Updates to lib/version.rb, rubocop-github.gemspec, and CONTRIBUTING.md to align with the new automated release process.
Changes
File | Description |
---|---|
.github/workflows/build.yml | Adds build workflow for building the gem |
.github/workflows/release.yml | Adds release workflow for publishing and releasing the gem |
.github/workflows/lint.yml | Introduces a linting workflow |
.github/workflows/ci.yml | Updates CI workflow to trigger on push and pull requests |
lib/version.rb | Defines the gem version |
CONTRIBUTING.md | Updates contribution guidelines to reflect new release process |
rubocop-github.gemspec | Uses the version from lib/version.rb and adds metadata |
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
.github/workflows/build.yml:34
- The command to set GEM_NAME may behave unexpectedly if multiple gemspec files exist; consider using a more specific file matching pattern or explicitly specifying the gemspec file to avoid ambiguity.
GEM_NAME=$(ls | grep gemspec | cut -d. -f1)
.github/workflows/release.yml:38
- The nested double quotes inside the 'tr -d' command may cause shell syntax issues; consider escaping the inner quotes or using an alternative quoting mechanism to ensure the command executes correctly.
echo "GEM_VERSION=$(gem build ${{ env.GEM_NAME }}.gemspec 2>&1 | grep Version | cut -d':' -f 2 | tr -d " \t\n\r")" >> $GITHUB_ENV
Tip: Copilot only keeps its highest confidence comments to reduce noise and keep you focused. Learn more
Automated Releases
This pull request implements automated releases to RubyGems and GitHub Packages for the
github/rubocop-github
project. This is accomplished by adding a newrelease
workflow. We use this same workflow for other RubyGems here at GitHub (ex:github/redacting-logger
andgithub/entitlements-app
).Going forward, rather than having to manually release (and have access to RubyGems), CI will handle this for us automatically. Simply updating the
lib/version.rb
file and runningbundle
is all that is required to trigger a new release. When changes merge intomain
wherelib/version.rb
has been modified, the release workflow starts, and ships your changes for you 🎉.