-
Notifications
You must be signed in to change notification settings - Fork 20
70 lines (55 loc) · 1.69 KB
/
release.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Release binaries for hax-engine
on:
push:
tags:
- '*'
jobs:
release-js:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Build JS
run: nix build .#hax-engine.passthru.js -L -o hax-engine.js
- run: |
tar --dereference -czf hacspec_js.tar.gz hax-engine.js
- name: Release
uses: softprops/action-gh-release@v1
with:
files: hacspec_js.tar.gz
release:
if: startsWith(github.ref, 'refs/tags/')
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
# - windows-latest (See #4)
ocaml-compiler: [4.14.x]
runs-on: ${{ matrix.os }}
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
- uses: dtolnay/[email protected]
- run: cargo install --path cli/driver && cargo install --path cli/subcommands
- run: opam install . --deps-only
working-directory: engine
- run: opam exec -- dune build
working-directory: engine
- run: |
cp engine/_build/default/bin/native_driver.exe hax-engine
tar -czf hacspec_${{ matrix.os }}.tar.gz hax-engine
- name: Release
uses: softprops/action-gh-release@v1
with:
files: hacspec_${{ matrix.os }}.tar.gz