Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build and Release

on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3

- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal

- name: Cache cargo directory
uses: actions/cache@v3
with:
path: ~/.cargo
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get -y install build-essential libx11-dev libx11-xcb-dev libxcursor-dev

- name: Build binary
run: cargo build --release

- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: linux-x86-binary
path: target/release/xcolor