-
Notifications
You must be signed in to change notification settings - Fork 4
94 lines (79 loc) · 2.67 KB
/
release.yml
File metadata and controls
94 lines (79 loc) · 2.67 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Release TUI
on:
push:
tags:
- "tui-v*"
permissions:
contents: write
jobs:
build-release:
name: Build TUI (${{ matrix.target }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
artifact: keyless-linux-x86_64
- os: macos-latest
target: x86_64-apple-darwin
artifact: keyless-macos-x86_64
- os: macos-latest
target: aarch64-apple-darwin
artifact: keyless-macos-aarch64
- os: windows-latest
target: x86_64-pc-windows-msvc
artifact: keyless-windows-x86_64.exe
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install system dependencies (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libasound2-dev libx11-dev libxi-dev libxtst-dev libxrandr-dev libxext-dev libxrender-dev libxfixes-dev libxcomposite-dev libxcursor-dev libxdo-dev pkg-config
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Build release binary
run: cargo build --release --target ${{ matrix.target }} --bin keyless
- name: Prepare artifact
shell: bash
run: |
if [ "${{ matrix.os }}" = "windows-latest" ]; then
cp target/${{ matrix.target }}/release/keyless.exe ${{ matrix.artifact }}
else
cp target/${{ matrix.target }}/release/keyless ${{ matrix.artifact }}
fi
- name: Upload artifact
uses: actions/upload-artifact@v5
with:
name: ${{ matrix.artifact }}
path: ${{ matrix.artifact }}
release:
name: Create TUI Release
needs: build-release
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v5
- name: Download all artifacts
uses: actions/download-artifact@v5
with:
path: artifacts
- name: Create TUI release
uses: softprops/action-gh-release@v2
with:
name: keyless ${{ github.ref_name }}
body: |
## keyless TUI Release
Command-line terminal UI version of keyless.
Download the binary for your platform:
- Linux: `keyless-linux-x86_64`
- macOS (Intel): `keyless-macos-x86_64`
- macOS (Apple Silicon): `keyless-macos-aarch64`
- Windows: `keyless-windows-x86_64.exe`
files: artifacts/**/*
draft: false
prerelease: false