build(deps): update everything #220
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Completions | |
| concurrency: shell-files | |
| on: | |
| push: | |
| paths: | |
| - "**.nix" | |
| - Cargo.* | |
| - flake.lock | |
| - src/arguments.rs | |
| - src/unit.rs | |
| workflow_dispatch: | |
| jobs: | |
| hsize: | |
| name: hsize | |
| runs-on: ubuntu-22.04 | |
| if: ${{ github.actor != 'dependabot[bot]' }} | |
| steps: | |
| - name: Clone repository | |
| uses: actions/checkout@v7 | |
| with: | |
| token: ${{ secrets.PAT }} | |
| - name: Install Nix | |
| uses: DeterminateSystems/nix-installer-action@v22 | |
| with: | |
| extra-conf: | | |
| log-lines = 500 | |
| - name: Set up build cache | |
| uses: actions/cache@v6 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: build-${{ runner.os }}-${{ hashFiles('Cargo.toml') }}-${{ hashFiles('flake.nix') }}-${{ hashFiles('**.lock') }} | |
| - name: Build with all features | |
| run: nix develop -c cargo b --all-features | |
| - name: Set up directory | |
| run: | | |
| rm -rf completions | |
| mkdir completions | |
| - name: Generate bash completions | |
| run: ./target/debug/hsize g c -s bash > completions/hsize.bash | |
| - name: Generate fish completions | |
| run: ./target/debug/hsize g c -s fish > completions/hsize.fish | |
| - name: Generate zsh completions | |
| run: ./target/debug/hsize g c -s zsh > completions/hsize.zsh | |
| - name: Update repository | |
| run: git pull | |
| - name: Commit changed files | |
| uses: stefanzweifel/git-auto-commit-action@v7 | |
| with: | |
| commit_message: "chore(cli): update shell completions" |