Skip to content

Commit 60d43df

Browse files
committed
add build ci job
1 parent 68332eb commit 60d43df

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/build.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: checkout
22+
uses: actions/checkout@v3
23+
24+
- uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # [email protected]
25+
with:
26+
bundler-cache: true
27+
28+
- name: bootstrap
29+
run: script/bootstrap
30+
31+
- name: build
32+
run: |
33+
GEM_NAME=$(ls | grep gemspec | cut -d. -f1)
34+
echo "Attempting to build gem $GEM_NAME..."
35+
gem build $GEM_NAME
36+
if [ $? -eq 0 ]; then
37+
echo "Gem built successfully!"
38+
else
39+
echo "Gem build failed!"
40+
exit 1
41+
fi

0 commit comments

Comments
 (0)