-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (44 loc) · 1.22 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
name: release
on:
push:
branches: [ "**" ]
tags: [ "v**" ]
pull_request:
permissions:
contents: write
jobs:
release:
name: Release - ${{ matrix.platform.release_for }}
strategy:
matrix:
platform:
- release_for: macOS-x86_64
os: macos-latest
target: x86_64-apple-darwin
- release_for: macOS-aarch64
os: macos-latest
target: aarch64-apple-darwin
- release_for: Linux-x86_64
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- release_for: Linux-aarch64
os: ubuntu-latest
target: aarch64-unknown-linux-gnu
runs-on: ${{ matrix.platform.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: cachix/install-nix-action@v25
- name: Build binary
run: |
nix build
- name: Archive
shell: bash
run: |
tar czvf taskui-${{ matrix.platform.target }}.tar.gz -h -C result/bin taskui
if: startsWith(github.ref, 'refs/tags/v')
- name: Release
uses: softprops/action-gh-release@v2
with:
files: "taskui-*.tar.gz"
if: startsWith(github.ref, 'refs/tags/v')