-
Notifications
You must be signed in to change notification settings - Fork 1
/
action.yml
42 lines (41 loc) · 1.43 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# See: https://docs.github.com/en/actions/creating-actions
name: Gem Push
author: FreeAgent
branding:
icon: 'globe'
color: 'red'
description: Push gem packages to a rubygems compatible repository
inputs:
key:
description: "Name of credentials key to use from ~/.gem/credentials."
default: ""
gem-glob:
description: File glob to match the .gem files to push
default: "pkg/*.gem"
pre-release:
description: Whether to push pre-release versions, instead of release versions (the default).
default: false
tag:
description: After pushing a new gem version, git tag with the version string
default: true
working-directory:
description: "The working directory of the ruby project. Useful for cases where files like .ruby-version and Gemfile aren't located in the root directory."
required: false
default: "."
outputs:
pushed-version:
description: "The version of the gem pushed to the repository"
value: ${{ steps.push-gem.outputs.pushed-version }}
runs:
using: "composite"
steps:
- name: Push Gem
id: push-gem
shell: bash
run: |
PATH="${{ github.action_path }}:$PATH"
args=""
[ '${{ inputs.pre-release }}' == true ] && args="$args -p"
[ '${{ inputs.tag }}' == true ] && args="$args -t"
[ ! -z ${{ inputs.working-directory }} ] && cd ${{ inputs.working-directory }}
gem-push-action.sh -k "${{inputs.key}}" $args ${{inputs.gem-glob}}