chore(release): Add .deb auto completion script (#1353)
Co-authored-by: GideonBear <87426140+GideonBear@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
f4a5507716
commit
5fad9f0ec6
49
.github/workflows/create_release_assets.yml
vendored
49
.github/workflows/create_release_assets.yml
vendored
@@ -65,6 +65,29 @@ jobs:
|
||||
- name: Run tests
|
||||
run: cargo test
|
||||
|
||||
# Used `https://github.com/BurntSushi/ripgrep/blob/master/.github/workflows/release.yml`
|
||||
# as a reference.
|
||||
- name: Build debug binary to create release assets
|
||||
shell: bash
|
||||
run: |
|
||||
cargo build --all-features
|
||||
bin="target/debug/topgrade"
|
||||
echo "BIN=$bin" >> $GITHUB_ENV
|
||||
|
||||
- name: Create deployment directory
|
||||
shell: bash
|
||||
run: |
|
||||
dir=deployment/deb
|
||||
mkdir -p "$dir"
|
||||
echo "DEPLOY_DIR=$dir" >> $GITHUB_ENV
|
||||
|
||||
- name: Generate shell completions
|
||||
shell: bash
|
||||
run: |
|
||||
"$BIN" --gen-completion bash > "$DEPLOY_DIR/topgrade.bash"
|
||||
"$BIN" --gen-completion fish > "$DEPLOY_DIR/topgrade.fish"
|
||||
"$BIN" --gen-completion zsh > "$DEPLOY_DIR/_topgrade"
|
||||
|
||||
- name: Build in Release profile with all features enabled
|
||||
run: cargo build --release --all-features
|
||||
|
||||
@@ -198,6 +221,32 @@ jobs:
|
||||
- name: Run tests
|
||||
run: cross test --target ${{matrix.target}}
|
||||
|
||||
# Used `https://github.com/BurntSushi/ripgrep/blob/master/.github/workflows/release.yml`
|
||||
# as a reference.
|
||||
- name: Build debug binary to create release assets
|
||||
shell: bash
|
||||
run: |
|
||||
# This build is not using the target arch since this binary is only needed in CI. It needs
|
||||
# to be the compiled for the runner since it has the run the binary to generate completion
|
||||
# scripts.
|
||||
cargo build --all-features
|
||||
bin="target/debug/topgrade"
|
||||
echo "BIN=$bin" >> $GITHUB_ENV
|
||||
|
||||
- name: Create deployment directory
|
||||
shell: bash
|
||||
run: |
|
||||
dir=deployment/deb
|
||||
mkdir -p "$dir"
|
||||
echo "DEPLOY_DIR=$dir" >> $GITHUB_ENV
|
||||
|
||||
- name: Generate shell completions
|
||||
shell: bash
|
||||
run: |
|
||||
"$BIN" --gen-completion bash > "$DEPLOY_DIR/topgrade.bash"
|
||||
"$BIN" --gen-completion fish > "$DEPLOY_DIR/topgrade.fish"
|
||||
"$BIN" --gen-completion zsh > "$DEPLOY_DIR/_topgrade"
|
||||
|
||||
- name: Build in Release profile with all features enabled
|
||||
run: cross build --release --all-features --target ${{matrix.target}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user