Skip to content

Commit c2eec54

Browse files
committed
GitHub Action that uploads builds as release artifacts
This GitHub Action builds Prism for Linux and MacOS and then uploads the builds to the latest release to be used by clients such as Sorbet
1 parent 3167699 commit c2eec54

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Build Library Artifacts
2+
3+
concurrency:
4+
group: "${{github.workflow}}-${{github.ref}}"
5+
cancel-in-progress: true
6+
7+
on:
8+
release:
9+
types: [created]
10+
workflow_dispatch:
11+
12+
jobs:
13+
build:
14+
strategy:
15+
matrix:
16+
os: [ubuntu-latest, macos-latest]
17+
runs-on: ${{ matrix.os }}
18+
19+
steps:
20+
- uses: actions/checkout@v3
21+
22+
- name: Set up Ruby
23+
uses: ruby/setup-ruby@v1
24+
with:
25+
ruby-version: '3.3'
26+
bundler-cache: true
27+
28+
- name: Build library
29+
run: bundle exec rake compile
30+
31+
- name: Upload to release
32+
if: github.event_name == 'release'
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
uses: softprops/action-gh-release@v1
36+
with:
37+
files: |
38+
build/libprism.so
39+
build/libprism.dylib

0 commit comments

Comments
 (0)