-
-
Notifications
You must be signed in to change notification settings - Fork 14
49 lines (41 loc) · 1.33 KB
/
artifacts-nix.yaml
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
name: 🏺 Artifacts (Nix)
# Trigger the workflow on push or pull request, but only for the main branch
on:
pull_request:
push:
branches: [main]
jobs:
stack:
name: 🖥️ ${{ matrix.os }} ❄️ Nix
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
steps:
- uses: actions/checkout@v2
name: 📤 Checkout
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/main'
- uses: cachix/install-nix-action@v16
name: ❄️ Set up Nix
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: actions/cache@v2
name: 🗄️ Cache ~/.stack
with:
path: ~/.stack
key: ${{ matrix.os }}-stack-nix-${{ hashFiles('stack.yaml.lock') }}
- name: 🏗️ Build
run: |
nix-shell --command build
- name: 🏺 Upload CLI Artifact
uses: actions/upload-artifact@v2
with:
name: fission-cli-${{ matrix.os }}-nix
path: ./.stack-work/**/*-nix/**/bin/fission
- name: 🏺 Upload Server Artifact
uses: actions/upload-artifact@v2
with:
name: fission-server-${{ matrix.os }}-nix
path: ./.stack-work/**/*-nix/**/bin/fission-server