-
Notifications
You must be signed in to change notification settings - Fork 11
51 lines (48 loc) · 1.33 KB
/
package.yml
File metadata and controls
51 lines (48 loc) · 1.33 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
51
name: package
on: [push, pull_request]
jobs:
ruby-versions:
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
with:
engine: cruby
min_version: 2.5
build:
needs: ruby-versions
runs-on: ${{ matrix.os }}
strategy:
matrix:
ruby: [ '${{ needs.ruby-versions.outputs.latest }}', 'head' ]
os: [ ubuntu-latest, macos-latest, windows-latest ]
exclude:
- { ruby: head, os: windows-latest }
steps:
- name: git config
run: |
git config --global core.autocrlf false
git config --global core.eol lf
git config --global advice.detachedHead 0
- uses: actions/checkout@v6.0.2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Install dependencies
run: bundle install
- name: Package
id: package
run: |
rake build
pkg="${GITHUB_REPOSITORY#*/}-${RUNNING_OS%-*}"
RUBY_VERSION=${{matrix.ruby}}
if [ "$RUBY_VERSION" = head ]; then
pkg=$pkg-$RUBY_VERSION
fi
echo "pkg=$pkg" >> $GITHUB_OUTPUT
env:
RUNNING_OS: ${{matrix.os}}
shell: bash
- name: Upload package
uses: actions/upload-artifact@v7
with:
path: pkg/*
name: ${{steps.package.outputs.pkg}}