Skip to content
upload-cloud

GitHub Action

Publish gem

v1.2.0 Latest version

Publish gem

upload-cloud

Publish gem

Build and publish a Ruby gem

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Publish gem

uses: dawidd6/action-publish-gem@v1.2.0

Learn more about this action in dawidd6/action-publish-gem

Choose a version

Publish gem Github Action

An action that builds and then publishes a Ruby gem to rubygems.org or GitHub Packages.

Will find every .gemspec file in current directory and publish a gem for it.

Runs on ubuntu and macos.

Usage

on:
  push:
    tags:
      - '*'

---

- name: Publish gem
  uses: dawidd6/action-publish-gem@v1
  with:
    # Optional, will publish to RubyGems if specified
    api_key: ${{secrets.RUBYGEMS_API_KEY}}
    # Optional, will publish to GitHub Packages if specified
    github_token: ${{secrets.GITHUB_TOKEN}}

It is possible to publish both to RubyGems and GitHub Packages