Skip to content

Commit 6f54c00

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 6f54c00

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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.2'
26+
bundler-cache: true
27+
28+
- name: Build library
29+
run: |
30+
bundle exec rake compile
31+
32+
- name: Upload to release
33+
if: github.event_name == 'release'
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
uses: softprops/action-gh-release@v1
37+
with:
38+
files: |
39+
build/libprism.so
40+
build/libprism.dylib

0 commit comments

Comments
 (0)