From 6977ff7ef334e756001a7c2bd8e927d8bc8e0758 Mon Sep 17 00:00:00 2001 From: Alex Kibler Date: Wed, 4 Feb 2026 10:09:54 -0700 Subject: [PATCH 1/4] WIP --- .github/workflows/release.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..5ab0966 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,29 @@ +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: Build gem + run: gem build data_nexus.gemspec + + - name: Push to RubyGems + run: gem push data_nexus-*.gem + env: + GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }} From 8205599d0dd9bc51b352a66281f20556283c712b Mon Sep 17 00:00:00 2001 From: Alex Kibler Date: Wed, 4 Feb 2026 10:46:39 -0700 Subject: [PATCH 2/4] Update README to remove language around use before publishing --- README.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/README.md b/README.md index cdaff87..91b3d1c 100644 --- a/README.md +++ b/README.md @@ -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' ``` From 790630e578d2f685760e791b3ab3ceff0e0085cc Mon Sep 17 00:00:00 2001 From: Alex Kibler Date: Wed, 4 Feb 2026 11:01:03 -0700 Subject: [PATCH 3/4] Fix typo in gem description --- data_nexus.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data_nexus.gemspec b/data_nexus.gemspec index 4be29fa..4e2af13 100644 --- a/data_nexus.gemspec +++ b/data_nexus.gemspec @@ -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' From 31339d6c87af69be962c0060556d9e8b988aa0ab Mon Sep 17 00:00:00 2001 From: Alex Kibler Date: Wed, 4 Feb 2026 11:02:32 -0700 Subject: [PATCH 4/4] Verify gem version before build/push --- .github/workflows/release.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5ab0966..2ff6119 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,10 +20,25 @@ jobs: - 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 - run: gem build data_nexus.gemspec + 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 data_nexus-*.gem + run: gem push ${{ steps.build.outputs.gem_file }} env: GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}