Skip to content

Commit 1dc229c

Browse files
committed
Setup release workflow
1 parent f2330e8 commit 1dc229c

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed

.github/workflows/release.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Build and Debug Precompiled Gem
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags: ["v*"]
7+
pull_request:
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
build:
15+
name: Build Native Gems
16+
strategy:
17+
matrix:
18+
os: [ubuntu-latest, macos-latest]
19+
target:
20+
- default
21+
- aarch64-linux
22+
- x86_64-linux
23+
- x86_64-linux-musl
24+
- aarch64-linux-musl
25+
- x64-mingw-ucrt
26+
- x86_64-darwin
27+
- arm64-darwin
28+
runs-on: ${{ matrix.os }}
29+
steps:
30+
- uses: actions/checkout@v4
31+
32+
- name: Setup Ruby
33+
uses: ruby/setup-ruby@v1
34+
with:
35+
bundler-cache: false
36+
37+
- name: Install Linux build tools
38+
if: runner.os == 'Linux'
39+
run: |
40+
sudo apt-get update
41+
sudo apt-get install -y build-essential check
42+
43+
- name: Install macOS build tools
44+
if: runner.os == 'macOS'
45+
run: |
46+
brew update
47+
brew install autoconf automake check
48+
49+
- name: Compile C extension
50+
run: |
51+
make
52+
53+
- name: Build gem
54+
run: gem build erbx.gemspec
55+
56+
- name: Rename artifact for target
57+
run: |
58+
gem_file=$(ls *.gem)
59+
mv "$gem_file" "${gem_file%.gem}-${{ matrix.target }}.gem"
60+
echo "Renamed gem file to: ${gem_file%.gem}-${{ matrix.target }}.gem"
61+
62+
- name: List Generated Gem Artifacts
63+
run: |
64+
echo "Listing generated .gem files:"
65+
ls -al *.gem

0 commit comments

Comments
 (0)