-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (45 loc) · 1.24 KB
/
_publish.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
43
44
45
46
47
---
name: _publish
on:
workflow_call:
inputs:
artifact_name:
description: The artifact name.
type: string
required: true
registry_key:
description: The gem registry credentials key.
type: string
required: true
registry_host:
description: The gem registry host.
type: string
required: true
secrets:
registry_credentials:
description: The gem registry credentials.
required: true
jobs:
publish:
name: Publish gem
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
with:
install_dependencies: 'false'
gem_credentials: ':${{ inputs.registry_key }}: ${{ secrets.registry_credentials }}'
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: ${{ inputs.artifact_name }}
path: pkg/
- name: Publish
run: gem push --key $REGISTRY_KEY --host $REGISTRY_HOST $GEM_ARTIFACTS/*
env:
REGISTRY_KEY: ${{ inputs.registry_key }}
REGISTRY_HOST: ${{ inputs.registry_host }}
GEM_ARTIFACTS: pkg