From 5d05a358c27054663832ef6c31050bcff5d11aec Mon Sep 17 00:00:00 2001 From: Gary Guo Date: Mon, 4 Mar 2024 12:32:57 +0000 Subject: [PATCH] Add CI --- .github/workflows/ci.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..8454d46 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,29 @@ +name: CI + +on: [push] + +jobs: + build: + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v4 + + - name: Install dependency + run: | + sudo apt-get update + sudo apt-get install -y libudev-dev + + - name: Build + run: cargo build --release + + - uses: actions/upload-artifact@v4 + with: + name: 'container-hotplug' + path: target/release/container-hotplug + + - uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1 + if: startsWith(github.ref, 'refs/tags/') + with: + prerelease: true + files: target/release/container-hotplug