-
Notifications
You must be signed in to change notification settings - Fork 54
50 lines (41 loc) · 1.29 KB
/
build-gem.yml
File metadata and controls
50 lines (41 loc) · 1.29 KB
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
48
49
50
name: Build gem
on:
workflow_call:
inputs:
version:
description: "The version of ruby to build against"
type: string
default: "3.2"
upload-artifact:
description: "Whether to upload the gem as an artifact"
type: boolean
required: false
default: true
jobs:
build-gem:
runs-on: ubuntu-latest
env:
LD_SKIP_DATABASE_TESTS: 0
BUILD_PLATFORM: ${{ startsWith(inputs.version, 'jruby') && 'jruby' || 'ruby' }}
FLAKY: ${{ startsWith(inputs.version, 'jruby') && 'true' || 'false' }}
steps:
- uses: actions/checkout@v4
- uses: launchdarkly/gh-actions/actions/persistent-stores@persistent-stores-v0
with:
redis: true
consul: true
dynamodb: true
- uses: ./.github/actions/setup
with:
version: ${{ inputs.version }}
- uses: ./.github/actions/check
with:
flaky: ${{ env.FLAKY }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Build gemspec
run: gem build launchdarkly-server-sdk.gemspec --platform=$BUILD_PLATFORM
- uses: actions/upload-artifact@v4
if: ${{ inputs.upload-artifact }}
with:
name: gems-${{ inputs.version }}
path: launchdarkly-server-sdk-*.gem