Socket
Socket
Sign inDemoInstall

semantic-release-rubygem

Package Overview
Dependencies
5
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

semantic-release-rubygem

A semantic-release plugin for publishing Ruby gems


Version published
Maintainers
1
Weekly downloads
438
decreased by-9.69%

Weekly downloads

Readme

Source

semantic-release-rubygem

semantic-release plugin for publishing Ruby gems.

StepDescription
verifyConditionsLocate and validate a .gemspec file, locate and validate a lib/**/version.rb file, verify the presence of the GEM_HOST_API_KEY environment variable, and create a credentials file with the API key.
prepareUpdate the version in the lib/**/version.rb version file and build the gem.
publishPush the gem to the gem server.

Install

$ npm install semantic-release-rubygem -D

Usage

Add the plugin to the semantic-release configuration file:

{
  "plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    "semantic-release-rubygem",
  ]
}

Configuration

Gem server authentication

The gem server authentication configuration is required.

The API key must be set using the GEM_HOST_API_KEY environment variable. To retrieve the key, you can:

  1. Login to RubyGems.org and click on 'Edit Profile'. You'll find the key in the 'API Access' section of the page.
  2. Sign into your gem host using the gem signin command. After you enter your credentials, your API key will be stored as a YAML value in the ~/.gem/credentials file under the rubygems_api_key key (or the hostname of your gem server).

gemspec file

This plugin requires exactly one valid .gemspec file to be present in the CWD.

lib/**/version.rb file

This plugin requires the version of the published gem to be defined in a version.rb file somewhere in the lib folder (e.g. lib/my/gem/version.rb). The version itself must be defined as a constant named VERSION inside the file:

module My
  module Gem
    VERSION = '0.0.0'
  end
end

Options

OptionsDescriptionDefault
gemHostThe gem server to push the gem to.'https//rubygems.org'
updateGemfileLockWhether to update the version of the gem to publish in the Gemfile.lock. This is useful if you are using the @semantic-release/git plugin to keep the version up to date in your git repo. When set to true the plugin will run bundle install to update the version. If another command is desired, it can be set by passing a string (e.g. bundle appraisal install).false
gemPublishWhether to publish your gem to the gem server.true
gemFileDirDirectory path in which to write the the built .gem file. If false, the .gem file will not be kept on the file system.false

Keywords

FAQs

Last updated on 23 Jul 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc