Skip to content

Merge pull request #154 from Toqozz/update_flake_lock_action #96

Merge pull request #154 from Toqozz/update_flake_lock_action

Merge pull request #154 from Toqozz/update_flake_lock_action #96

Workflow file for this run

name: build
on: [pull_request, push]
jobs:
wired:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Restore cargo cache
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libdbus-1-dev libcairo-dev libpango1.0-dev libglib2.0-dev \
libx11-dev libxss-dev rustc cargo pkg-config
- name: Build wired-notify
run: cargo build --release
- name: Create tarball
if: startsWith(github.ref, 'refs/tags/')
run: |
mkdir -p bin
cp target/release/wired bin/
VERSION=$(./bin/wired --version)
tar -czf "wired_${VERSION}_x86_64.tar.gz" \
bin/wired LICENSE
- name: Release tarball
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: wired_*_x86_64.tar.gz
- name: SHA256 Hash
if: startsWith(github.ref, 'refs/tags/')
run: sha256sum wired_*_x86_64.tar.gz