-
Notifications
You must be signed in to change notification settings - Fork 2
68 lines (64 loc) · 1.99 KB
/
main.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
name: Build and release
on:
push:
tags:
- "v*.*.*"
jobs:
release:
name: Release - ${{ matrix.platform.os }}
strategy:
matrix:
platform:
- os: ubuntu-20.04
target: x86_64-unknown-linux-gnu
bin: rlviser
name: rlviser-x86_64-unknown-linux-gnu.tar.gz
- os: windows-latest
target: x86_64-pc-windows-msvc
bin: rlviser.exe
name: rlviser-x86_64-pc-windows-msvc.zip
runs-on: ${{ matrix.platform.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get required packages (Linux only)
if: contains(matrix.platform.os, 'ubuntu')
run: sudo apt install g++ pkg-config libx11-dev libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev
- name: Cache cargo & target directories
uses: Swatinem/rust-cache@v2
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
with:
target: ${{ matrix.platform.target }}
args: "--release"
- name: Upload artifact (Windows)
if: contains(matrix.platform.os, 'windows')
uses: actions/upload-artifact@v4.3.3
with:
name: windows
path: target/**/release/rlviser.exe
- name: Upload artifact (Ubuntu)
if: contains(matrix.platform.os, 'ubuntu')
uses: actions/upload-artifact@v4.3.3
with:
name: linux
path: target/**/release/rlviser
publish:
needs: [release]
name: Publish
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: target/
merge-multiple: true
- name: Publish to GitHub Releases
uses: softprops/action-gh-release@v2
with:
files: ./**/target/**
generate_release_notes: true
body: |
Extra keybinds for RLViser are included in the README