Skip to content

Commit bc8bb3f

Browse files
committed
add a new ci job to test builds
1 parent 14f2e21 commit bc8bb3f

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/build.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
workflow_call:
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
build:
17+
name: build
18+
19+
strategy:
20+
matrix:
21+
os: [ubuntu-latest, macos-latest]
22+
runs-on: ${{ matrix.os }}
23+
24+
steps:
25+
- name: checkout
26+
uses: actions/checkout@v4
27+
28+
- uses: ruby/setup-ruby@f2f42b7848feff522ffa488a5236ba0a73bccbdd
29+
with:
30+
bundler-cache: true
31+
32+
- name: build
33+
run: |
34+
GEM_NAME=$(ls | grep gemspec | cut -d. -f1)
35+
echo "Attempting to build gem $GEM_NAME..."
36+
gem build $GEM_NAME
37+
if [ $? -eq 0 ]; then
38+
echo "Gem built successfully!"
39+
else
40+
echo "Gem build failed!"
41+
exit 1
42+
fi

0 commit comments

Comments
 (0)