This Action for rubygems enables arbitrary actions with the gem
command-line client, including publishing to a registry.
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"]
}
RUBYGEMS_AUTH_TOKEN
- Optional. The token to use for authentication with the rubygems repository. Required forgem push
.
RUBYGEMS_HOST
- Optional. To specify a repository to authenticate with. Defaults tohttps://rubygems.org
more info.
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"]
}
The Dockerfile and associated scripts and documentation in this project are released under the MIT License.