Closed Eazybright closed 11 months ago
I just added the RUBYGEMS_AUTH_TOKEN
secret to this repo.
There are a couple of things we might have to change. Since this is merged, it means a new PR will need to be submitted to effect this change.
name
in the release.yml should be more descriptive like this Publish new Novu Ruby SDK release to Ruby Gems
v1.0.5
to publish as the version of the gem? Does it get it from the gemspec? Where does the number come from?I think we might need a step to get the latest version of the GitHub tag of the repo. Something like this:
- name: Get the release version
id: get_version
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_OUTPUT
And then we need a step to set the version as the gem version to publish: ${{ steps.get_version.outputs.VERSION }}
to rubygems.
This is my assumption @Eazybright @Cliftonz. So how do we accomplish this? Because it's necessary.
This is a similar release workflow on another Novu SDK: https://github.com/novuhq/novu-java/blob/main/.github/workflows/maven-publish.yml
I just added the
RUBYGEMS_AUTH_TOKEN
secret to this repo.There are a couple of things we might have to change. Since this is merged, it means a new PR will need to be submitted to effect this change.
- The value of
name
in the release.yml should be more descriptive like thisPublish new Novu Ruby SDK release to Ruby Gems
- I looked at the steps in the release.yml file. And it is in this manner:
- A step to set up ruby
- A step to run tests
- A step to publish gem: This section creates a credentials file, appends our rubygems API to the file, builds the gemspec, and then publishes the gem. The first question I have is: How does it know the exact version, e.g
v1.0.5
to publish as the version of the gem? Does it get it from the gemspec? Where does the number come from?I think we might need a step to get the latest version of the GitHub tag of the repo. Something like this:
- name: Get the release version id: get_version run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_OUTPUT
And then we need a step to set the version as the gem version to publish:
${{ steps.get_version.outputs.VERSION }}
to rubygems.This is my assumption @Eazybright @Cliftonz. So how do we accomplish this? Because it's necessary.
RubyGems uses the configuration in the novu.gemspec
file to determine the release version.
There's also a version file in the SDK lib/novu/version.rb
but it's not being used at the moment.
@unicodeveloper
@unicodeveloper a PR has been raised: https://github.com/novuhq/novu-ruby/pull/46
This PR setup a github action workflow process for publishing this SDK to RubyGems.org on New Tagged Release.
What to do: