-
Notifications
You must be signed in to change notification settings - Fork 48
56 lines (54 loc) · 1.86 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
name: "Release"
on:
push:
tags:
- 'release/[0-9]+.[0-9]+.[0-9]+'
jobs:
macosRelease:
name: Build MacOS Binary
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: build hevm
run: |
nix build .#redistributable --out-link hevmMacos
cp ./hevmMacos/bin/hevm ./hevm-x86_64-macos
- uses: actions/upload-artifact@v3
with:
name: hevm-x86_64-macos
path: ./hevm-x86_64-macos
linuxRelease:
name: Create Release
needs: macosRelease
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: build hevm
run: |
nix build .#redistributable --out-link hevmLinux
cp ./hevmLinux/bin/hevm ./hevm-x86_64-linux
- name: download macos binary
uses: actions/download-artifact@v3
with:
name: hevm-x86_64-macos
- name: create github release & upload binaries
uses: softprops/[email protected]
with:
files: |
./hevm-x86_64-linux
./hevm-x86_64-macos
- name: prepare hackage artifacts
run: |
nix-shell --command "cabal sdist --builddir=${{ runner.temp }}/packages"
nix-shell --command "cabal haddock lib:hevm --builddir=${{ runner.temp }}/docs --haddock-for-hackage --haddock-option=--hyperlinked-source"
- name: publish to hackage
uses: haskell-actions/hackage-publish@v1
with:
hackageToken: ${{ secrets.HACKAGE_AUTH_TOKEN }}
packagesPath: ${{ runner.temp }}/packages/sdist
docsPath: ${{ runner.temp }}/docs
publish: true