Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Release

on:
release:
types: [published]

jobs:
release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
bundler-cache: true

- name: Run tests
run: bundle exec rspec

- name: Verify release tag matches gemspec
run: |
GEM_VERSION=$(ruby -r ./lib/data_nexus/version -e "puts DataNexus::VERSION")
TAG_VERSION=${GITHUB_REF_NAME#v}
if [ "$GEM_VERSION" != "$TAG_VERSION" ]; then
echo "::error::Version mismatch: gemspec has $GEM_VERSION but tag is $TAG_VERSION"
exit 1
fi
echo "Version verified: $GEM_VERSION"

- name: Build gem
id: build
run: |
gem build data_nexus.gemspec
GEM_FILE=$(ls data_nexus-*.gem)
echo "gem_file=$GEM_FILE" >> $GITHUB_OUTPUT
echo "Built: $GEM_FILE"

- name: Push to RubyGems
run: gem push ${{ steps.build.outputs.gem_file }}
env:
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,6 @@ Ruby client for the DataNexus API.

## Installation

Install from GitHub (before gem is published):

```ruby
gem 'data_nexus', git: 'https://github.com/DartHealth/datanexus-ruby.git', tag: 'v0.1.0'
```

Or from RubyGems (once published):

```ruby
gem 'data_nexus'
```
Expand Down
2 changes: 1 addition & 1 deletion data_nexus.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
spec.email = ['alexkibler@me.com']

spec.summary = 'Ruby client for the DataNexus API'
spec.description = "A Ruby gem for interacting with the Dart Health's DataNexus API."
spec.description = "A Ruby gem for interacting with Dart Health's Data Nexus API."
spec.homepage = 'https://github.com/DartHealth/datanexus-ruby'
spec.license = 'MIT'
spec.required_ruby_version = '>= 3.0.0'
Expand Down