-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (66 loc) · 1.99 KB
/
build-nix.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
71
72
73
name: nix
on:
push:
branches:
- master
tags:
- '**'
pull_request:
workflow_dispatch:
permissions: read-all
jobs:
linux:
strategy:
fail-fast: false
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
with:
fetch-depth: 0
- uses: DeterminateSystems/nix-installer-action@8cdf194da984e4f12b2f8c36d1fa107c1dd67f5c
- uses: DeterminateSystems/magic-nix-cache-action@87e8236f46702ab0ce5a058b605a173ec88d618e
- run: nix build .#static
- name: Create tar.gz
run: tar -czvf jj_tui_linux-x86_64.tar.gz -C result/bin jj_tui
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: jj_tui_linux
path: jj_tui_linux-x86_64.tar.gz
macos:
strategy:
fail-fast: false
runs-on: macos-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
with:
fetch-depth: 0
- uses: DeterminateSystems/nix-installer-action@8cdf194da984e4f12b2f8c36d1fa107c1dd67f5c
- uses: DeterminateSystems/magic-nix-cache-action@87e8236f46702ab0ce5a058b605a173ec88d618e
- run: nix build
- name: Create tar.gz
run: tar -czvf jj_tui_macos-aarch64.tar.gz -C result/bin jj_tui
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: jj_tui_macos
path: jj_tui_macos-aarch64.tar.gz
release:
permissions:
contents: write
discussions: write
runs-on: ubuntu-latest
needs: [macos, linux]
name: release if tag
steps:
- name: Download artifacts
uses: actions/[email protected]
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
jj_tui_macos/jj_tui_macos-aarch64.tar.gz
jj_tui_linux/jj_tui_linux-x86_64.tar.gz