From bce6ae279741b595286539ab2ac47b60516d3427 Mon Sep 17 00:00:00 2001 From: figsoda Date: Wed, 20 Oct 2021 19:27:18 -0400 Subject: [PATCH] generate completions and man page in ci --- .github/workflows/build.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4f6592f..466dc9f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -104,13 +104,15 @@ jobs: - name: Install dependencies for musl libc run: | sudo apt-get update - sudo apt-get install musl-tools + sudo apt-get install help2man musl-tools - name: Run cargo build uses: actions-rs/cargo@v1 with: command: build args: --release --target x86_64-unknown-linux-musl + env: + GEN_COMPLETIONS: 1 - name: Run cargo test uses: actions-rs/cargo@v1 @@ -118,6 +120,11 @@ jobs: command: test args: --target x86_64-unknown-linux-musl + - name: Build man page and find completions + run: | + help2man target/x86_64-unknown-linux-musl/release/ouch > ouch.1 + cp -r target/x86_64-unknown-linux-musl/release/build/ouch-*/out/completions . + - name: Strip binary run: strip target/x86_64-unknown-linux-musl/release/ouch @@ -127,6 +134,17 @@ jobs: name: 'ouch-x86_64-linux-musl' path: target/x86_64-unknown-linux-musl/release/ouch + - name: Upload completions + uses: actions/upload-artifact@v2 + with: + name: completions + path: completions + + - name: Upload man page + uses: actions/upload-artifact@v2 + with: + name: ouch.1 + path: ouch.1 x86_64_glibc: name: Ubuntu 20.04 (glibc)