Skip to content

Commit

Permalink
ci(release): gen completions and add completions
Browse files Browse the repository at this point in the history
  • Loading branch information
saying121 committed Apr 28, 2024
1 parent 286f4ce commit f98ba17
Show file tree
Hide file tree
Showing 5 changed files with 1,450 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,3 +188,17 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
# ref: refs/tags/${{ needs.get-version.outputs.tag_version }}
checksum: sha256

- name: Generate completions
if: ${{ matrix.os == 'ubuntu-latest' && matrix.target == 'x86_64-unknown-linux-gnu' }}
run: |
./target/x86_64-unknown-linux-gnu/release/lcode --generate=zsh | tee ./completions/_lcode
./target/x86_64-unknown-linux-gnu/release/lcode --generate=bash | tee ./completions/lcode.bash
./target/x86_64-unknown-linux-gnu/release/lcode --generate=fish | tee ./completions/lcode.fish
git config user.email "actions@github"
git config user.name "Github Actions"
git remote set-url origin https://x-access-token:"${GITHUB_TOKEN}"@github.com/"${GITHUB_REPOSITORY}".git
git add completions/
# shellcheck disable=SC2015
git diff --quiet && git diff --staged --quiet || (git commit -m "${COMMIT_MSG}"; git push origin HEAD:"${GITHUB_REF}")
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ echo 'eval $(lcode --generate zsh)' >>~/.zshrc
echo 'eval $(lcode --generate bash)' >>~/.bashrc
# ...
```
<!-- use [zi](https://github.com/z-shell/zi) -->
<!-- ```zsh -->
<!-- zi -->
<!-- ``` -->

## 📼Videos

Expand Down
Loading

0 comments on commit f98ba17

Please sign in to comment.