Skip to content

Commit

Permalink
Produce completions for complgen itself in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
adaszko committed Sep 30, 2023
1 parent 39ac21d commit b8bcaac
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 6 deletions.
27 changes: 23 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
name: Release
on:
push:
branches: testci
tags:
- test
- "v[0-9]+.[0-9]+.[0-9]+"

jobs:
release-linux-binaries:
release-x86_64-linux-binaries:
runs-on: ubuntu-20.04
steps:
- name: Checkout source code
Expand All @@ -28,11 +29,17 @@ jobs:
rustup target add x86_64-unknown-linux-musl
cargo build --release --target=x86_64-unknown-linux-musl
cp target/x86_64-unknown-linux-musl/release/complgen complgen-x86_64-unknown-linux-musl
- run: |
./complgen-x86_64-unknown-linux-musl compile --bash-script complgen.bash --fish-script complgen.fish --zsh-script complgen.zsh usage/complgen.usage
mkdir -p staging
cp complgen.{bash,fish,zsh} staging/
cp complgen-x86_64-unknown-linux-musl staging/
tar czf complgen-x86_64-unknown-linux-musl.tar.gz "staging"
- uses: softprops/action-gh-release@v1
with:
fail_on_unmatched_files: true
files: |
complgen-x86_64-unknown-linux-musl
complgen-x86_64-unknown-linux-musl.tar.gz
release-arm-linux-binaries:
Expand All @@ -57,11 +64,17 @@ jobs:
rustup target add aarch64-unknown-linux-musl
cargo build --release
cp target/aarch64-unknown-linux-musl/release/complgen complgen-aarch64-unknown-linux-musl
- run: |
./complgen-aarch64-unknown-linux-musl compile --bash-script complgen.bash --fish-script complgen.fish --zsh-script complgen.zsh usage/complgen.usage
mkdir -p staging
cp complgen.{bash,fish,zsh} staging/
cp complgen-aarch64-unknown-linux-musl staging/
tar czf complgen-aarch64-unknown-linux-musl.tar.gz "staging"
- uses: softprops/action-gh-release@v1
with:
fail_on_unmatched_files: true
files: |
complgen-aarch64-unknown-linux-musl
complgen-aarch64-unknown-linux-musl.tar.gz
release-macos-binaries:
Expand Down Expand Up @@ -90,8 +103,14 @@ jobs:
run: |
cargo build --release --target ${{ matrix.target }}
cp target/${{ matrix.target }}/release/complgen complgen-${{ matrix.target }}
- run: |
./complgen-${{ matrix.target }} compile --bash-script complgen.bash --fish-script complgen.fish --zsh-script complgen.zsh usage/complgen.usage
mkdir -p staging
cp complgen.{bash,fish,zsh} staging/
cp complgen-${{ matrix.target }} staging/
tar czf complgen-${{ matrix.target }}.tar.gz "staging"
- uses: softprops/action-gh-release@v1
with:
fail_on_unmatched_files: true
files: |
complgen-${{ matrix.target }}
complgen-${{ matrix.target }}.tar.gz
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ $ brew install adaszko/complgen/complgen

### Downloading binaries (Linux, macOS)

Just `wget` a binary for your architecture from [the releases
page](https://github.com/adaszko/complgen/releases), `chmod a+x` the downloaded file and you're good to go.
Just `wget` a tarball for your architecture from [the releases
page](https://github.com/adaszko/complgen/releases), unpack it, `chmod a+x` the binary and you're good to go.
The Linux binaries are linked against [musl libc](http://musl.libc.org/), so they should work on any Linux
distribution.

Expand Down

0 comments on commit b8bcaac

Please sign in to comment.