-
Notifications
You must be signed in to change notification settings - Fork 0
Support Ruby 3.3+, update Rubocop, and prepare release process #2
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
e9cb0b9
update ruby, rubocop, and add cop changes
anarchivist 70c9d4a
add docker/compose configs for gem testing/building
anarchivist 4ba55cb
rubocop fixes
anarchivist 5924756
prep release, update build workflows
anarchivist af31c2c
address PR feedback
anarchivist 44e004d
update changelog
anarchivist File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| name: Ruby Gem | ||
|
|
||
| on: | ||
| release: | ||
| types: [published] | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Build + Publish | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| packages: write | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v3 | ||
|
|
||
| - name: Set up Ruby | ||
| uses: ruby/setup-ruby@v1 | ||
| with: | ||
| ruby-version: '3.3' | ||
| bundler-cache: true | ||
|
|
||
| - name: Publish to RubyGems | ||
| run: | | ||
| mkdir -p $HOME/.gem | ||
| touch $HOME/.gem/credentials | ||
| chmod 0600 $HOME/.gem/credentials | ||
| printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials | ||
| gem build *.gemspec | ||
| gem push *.gem | ||
| env: | ||
| GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}" |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| # ============================================================================= | ||
| # Target: base | ||
|
|
||
| FROM ruby:3.3-alpine AS base | ||
|
|
||
| RUN apk --no-cache --update upgrade && \ | ||
| apk --no-cache add \ | ||
| bash \ | ||
| ca-certificates \ | ||
| git \ | ||
| libc6-compat \ | ||
| openssl \ | ||
| tzdata \ | ||
| xz-libs \ | ||
| yaml-dev \ | ||
| && rm -rf /var/cache/apk/* | ||
|
|
||
| WORKDIR /opt/app | ||
|
|
||
| # ============================================================================= | ||
| # Target: development | ||
| # | ||
|
|
||
| FROM base AS development | ||
|
|
||
| # Install system packages needed to build gems with C extensions. | ||
| RUN apk --update --no-cache add \ | ||
| build-base \ | ||
| coreutils \ | ||
| git \ | ||
| && rm -rf /var/cache/apk/* | ||
|
|
||
| # The base image ships an older bundler, but we want something more recent | ||
| RUN gem install bundler -v 2.5.22 | ||
|
|
||
| # Copy codebase to WORKDIR. Unlike application projects, for a gem project | ||
| # we need to do this before running `bundle install`, in order for the gem | ||
| # we're building to be able to "install" itself. | ||
| COPY . . | ||
|
|
||
| # Install gems. | ||
| RUN bundle install --path=/usr/local/bundle | ||
|
|
||
| # ============================================================================= | ||
| # Target: production | ||
|
|
||
| FROM base AS production | ||
|
|
||
| # Copy the built codebase from the dev stage | ||
| COPY --from=development /opt/app /opt/app | ||
| COPY --from=development /usr/local/bundle /usr/local/bundle | ||
|
|
||
| # Sanity-check that everything was installed correctly and still runs in the | ||
| # slimmed-down production image. | ||
| RUN bundle config set deployment 'true' | ||
| RUN bundle install --local --path=/usr/local/bundle | ||
|
|
||
| CMD ["bundle", "exec", "rake"] | ||
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| services: | ||
| gem: | ||
| build: | ||
| context: . | ||
| target: development | ||
| restart: always | ||
| volumes: | ||
| # Note that this mounts the *entire* repo directory (including | ||
| # files ignored in .dockerignore when building the image) | ||
| - ./:/opt/app |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| inherit_from: ../.rubocop.yml | ||
|
|
||
| require: | ||
| plugins: | ||
| - rubocop-rake |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.