Skip to content

scarhand/actions-ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Actions for Ruby Gems

This Action for rubygems enables arbitrary actions with the gem command-line client, including publishing to a registry.

Usage

An example workflow to build and publish a gem to the default public registry follows:

workflow "Build, Test, and Publish" {
  on = "push"
  resolves = ["Publish"]
}

action "Build" {
  uses = "scarhand/actions-ruby@master"
  args = "build *.gemspec"
}

# Filter for a new tag
action "Tag" {
  needs = "Build"
  uses = "actions/bin/filter@master"
  args = "tag v*"
}

action "Publish" {
  needs = "Tag"
  uses = "scarhand/actions-ruby@master"
  args = "push *.gem"
  secrets = ["RUBYGEMS_AUTH_TOKEN"]
}

Secrets

  • RUBYGEMS_AUTH_TOKEN - Optional. The token to use for authentication with the rubygems repository. Required for gem push.

Environment variables

  • RUBYGEMS_HOST - Optional. To specify a repository to authenticate with. Defaults to https://rubygems.org more info.

Example

To authenticate with, and publish to, a registry other than https://rubygems.org:

action "Publish" {
  uses = "scarhand/actions-ruby@master"
  args = "push *.gem"
  env = {
    RUBYGEMS_HOST = "https://someOtherRepository.someDomain.net"
  }
  secrets = ["RUBYGEMS_AUTH_TOKEN"]
}

License

The Dockerfile and associated scripts and documentation in this project are released under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published