mirror of
https://github.com/figsoda/mmtc
synced 2024-11-10 18:24:13 +00:00
add completions to github release
This commit is contained in:
parent
f9c8f67635
commit
1bd16f7064
1 changed files with 76 additions and 0 deletions
76
.github/workflows/release.yml
vendored
76
.github/workflows/release.yml
vendored
|
@ -73,3 +73,79 @@ jobs:
|
|||
asset_path: ./target/${{ matrix.target }}/release/mmtc${{ matrix.ext }}
|
||||
asset_name: mmtc-${{ matrix.target }}${{ matrix.ext }}
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
completions:
|
||||
name: completions
|
||||
needs: create_release
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install rust toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: nightly
|
||||
override: true
|
||||
|
||||
- name: Cargo build
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: build
|
||||
|
||||
- name: Find generated completions
|
||||
run: |
|
||||
outputs=(target/debug/build/mmtc-*/out/completions)
|
||||
cp -r "${outputs[0]}" completions
|
||||
|
||||
- name: Upload bash completion
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
with:
|
||||
upload_url: ${{ needs.create_release.outputs.upload_url }}
|
||||
asset_path: ./completions/mmtc.bash
|
||||
asset_name: mmtc.bash
|
||||
asset_content_type: text/plain
|
||||
|
||||
- name: Upload elvish completion
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
with:
|
||||
upload_url: ${{ needs.create_release.outputs.upload_url }}
|
||||
asset_path: ./completions/mmtc.elv
|
||||
asset_name: mmtc.elv
|
||||
asset_content_type: text/plain
|
||||
|
||||
- name: Upload fish completion
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
with:
|
||||
upload_url: ${{ needs.create_release.outputs.upload_url }}
|
||||
asset_path: ./completions/mmtc.fish
|
||||
asset_name: mmtc.fish
|
||||
asset_content_type: text/plain
|
||||
|
||||
- name: Upload powershell completion
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
with:
|
||||
upload_url: ${{ needs.create_release.outputs.upload_url }}
|
||||
asset_path: ./completions/_mmtc.ps1
|
||||
asset_name: mmtc.ps1
|
||||
asset_content_type: text/plain
|
||||
|
||||
- name: Upload zsh completion
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
with:
|
||||
upload_url: ${{ needs.create_release.outputs.upload_url }}
|
||||
asset_path: ./completions/_mmtc
|
||||
asset_name: mmtc.zsh
|
||||
asset_content_type: text/plain
|
||||
|
|
Loading…
Reference in a new issue