-
Notifications
You must be signed in to change notification settings - Fork 2
62 lines (50 loc) · 1.5 KB
/
Copy pathrust.yml
File metadata and controls
62 lines (50 loc) · 1.5 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
name: Input Simulator CI
on:
push:
tags:
- 'v*'
env:
CARGO_TERM_COLOR: always
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ubuntu-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install Linux dependencies
run: |
sudo apt-get update
sudo apt-get install -y libwayland-dev libxkbcommon-dev libx11-dev zip
- name: Build
run: cargo build --release
- name: Prepare artifact directory
run: |
export VERSION=$(cargo metadata --format-version 1 | jq -r '.packages[] | select(.name=="inputsimulator") | .version')
mkdir -p "inputsimulator"
cp target/release/inputsimulator "inputsimulator/inputsimulator"
zip -r "inputsimulator-${VERSION}-linux.zip" inputsimulator
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: inputsimulator-${VERSION}-linux
path: inputsimulator-${VERSION}-linux.zip
compression-level: 9
- name: Create Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: inputsimulator-*.zip
draft: false
prerelease: false
generate_release_notes: true