-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (49 loc) · 1.44 KB
/
binaries.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: NIF binaries
on:
push:
branches:
- main
paths:
- "native/**"
- ".github/workflows/binaries.yml"
tags:
- "*"
pull_request:
paths:
- ".github/workflows/binaries.yml"
workflow_dispatch:
jobs:
build_binary:
name: ${{ matrix.job.target }} / ${{ matrix.job.os }}
runs-on: ${{ matrix.job.os }}
permissions:
contents: write
strategy:
fail-fast: false
matrix:
nif_version: ["2.16"]
job:
- { target: x86_64-apple-darwin , os: macos-12 }
- { target: x86_64-pc-windows-gnu , os: windows-2022 }
- { target: x86_64-unknown-linux-gnu , os: ubuntu-22.04 }
env:
PROJECT_VERSION: "0.1.2-test2"
steps:
- uses: actions/checkout@v4
- run: rustup target add ${{ matrix.job.target }}
- uses: philss/rustler-precompiled-action@main
id: precompile
with:
project-dir: "native/candlex"
project-name: candlex
project-version: ${{ env.PROJECT_VERSION }}
target: ${{ matrix.job.target }}
nif-version: ${{ matrix.nif_version }}
# use-cross: false
# doesn't work, not sure why
# See https://github.com/philss/rustler-precompiled-action/pull/9
use-cross: null
- uses: softprops/action-gh-release@v1
with:
files: ${{ steps.precompile.outputs.file-path }}
if: startsWith(github.ref, 'refs/tags/')