mirror of
https://github.com/Llewellynvdm/zoxide.git
synced 2024-11-25 22:17:33 +00:00
Update GitHub Actions
This commit is contained in:
parent
03df9d4d1f
commit
a7c8231e56
12
.github/workflows/ci.yml
vendored
12
.github/workflows/ci.yml
vendored
@ -19,31 +19,31 @@ jobs:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@dc323e67f16fb5f7663d20ff7941f27f5809e9b6 # v2.6.0
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
|
||||
- uses: actions-rs/toolchain@v1
|
||||
if: ${{ matrix.os == 'windows-latest' }}
|
||||
with:
|
||||
toolchain: stable
|
||||
components: rustfmt, clippy
|
||||
profile: minimal
|
||||
override: true
|
||||
- uses: cachix/install-nix-action@d56f3ce9be45c562799280e8a561fbbe8f36de44 # v16
|
||||
- uses: cachix/install-nix-action@v20
|
||||
if: ${{ matrix.os != 'windows-latest' }}
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
- uses: cachix/cachix-action@6a9a34cdd93d0ae4b4b59fd678660efb08109f2f # v12
|
||||
- uses: cachix/cachix-action@v12
|
||||
if: ${{ matrix.os != 'windows-latest' && env.CACHIX_AUTH_TOKEN != '' }}
|
||||
with:
|
||||
authToken: ${{ env.CACHIX_AUTH_TOKEN }}
|
||||
name: zoxide
|
||||
|
||||
- name: Setup cache
|
||||
uses: Swatinem/rust-cache@81d053bdb0871dcd3f10763c8cc60d0adc41762b # v1
|
||||
uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
key: ${{ matrix.target }}
|
||||
key: ${{ matrix.os }}
|
||||
|
||||
- run: cargo xtask ci
|
||||
if: ${{ matrix.os == 'windows-latest' }}
|
||||
|
2
.github/workflows/no-response.yml
vendored
2
.github/workflows/no-response.yml
vendored
@ -11,7 +11,7 @@ jobs:
|
||||
if: github.repository == 'ajeetdsouza/zoxide'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: lee-dohm/no-response@9bb0a4b5e6a45046f00353d5de7d90fb8bd773bb # v0.5.0
|
||||
- uses: lee-dohm/no-response@v0.5.0
|
||||
with:
|
||||
token: ${{ github.token }}
|
||||
daysUntilClose: 30
|
||||
|
18
.github/workflows/release.yml
vendored
18
.github/workflows/release.yml
vendored
@ -39,19 +39,19 @@ jobs:
|
||||
target: aarch64-pc-windows-msvc
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@dc323e67f16fb5f7663d20ff7941f27f5809e9b6 # v2.6.0
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Get version
|
||||
id: get_version
|
||||
uses: SebRollen/toml-action@2bd04b06a3ebc3e6a3eb6060de115710cad16cd6 # v1.0.2
|
||||
uses: SebRollen/toml-action@v1.0.2
|
||||
with:
|
||||
file: Cargo.toml
|
||||
field: package.version
|
||||
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
profile: minimal
|
||||
@ -59,12 +59,12 @@ jobs:
|
||||
target: ${{ matrix.target }}
|
||||
|
||||
- name: Setup cache
|
||||
uses: Swatinem/rust-cache@81d053bdb0871dcd3f10763c8cc60d0adc41762b # v1
|
||||
uses: Swatinem/rust-cache@v1.0.2
|
||||
with:
|
||||
key: ${{ matrix.target }}
|
||||
|
||||
- name: Build binary
|
||||
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: build
|
||||
args: --release --locked --target=${{ matrix.target }} --color=always --verbose
|
||||
@ -72,13 +72,13 @@ jobs:
|
||||
|
||||
- name: Install cargo-deb
|
||||
if: ${{ matrix.deb == true }}
|
||||
uses: actions-rs/install@9da1d2adcfe5e7c16992e8242ca33a56b6d9b101 # v0.1.2
|
||||
uses: actions-rs/install@v0.1
|
||||
with:
|
||||
crate: cargo-deb
|
||||
|
||||
- name: Build deb
|
||||
if: ${{ matrix.deb == true }}
|
||||
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: deb
|
||||
args: --no-build --no-strip --output=. --target=${{ matrix.target }}
|
||||
@ -103,7 +103,7 @@ jobs:
|
||||
./target/${{ matrix.target }}/release/zoxide.exe
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 # v2.3.1
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ matrix.target }}
|
||||
path: |
|
||||
@ -113,7 +113,7 @@ jobs:
|
||||
|
||||
- name: Create release
|
||||
if: ${{ github.ref == 'refs/heads/main' && startsWith(github.event.head_commit.message, 'chore(release)') }}
|
||||
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
draft: true
|
||||
files: |
|
||||
|
@ -35,6 +35,8 @@ impl Fzf {
|
||||
#[cfg(not(windows))]
|
||||
let program = "fzf";
|
||||
|
||||
// TODO: check version of fzf here.
|
||||
|
||||
let mut cmd = Command::new(program);
|
||||
cmd.args([
|
||||
// Search mode
|
||||
|
@ -40,7 +40,6 @@ if (not ($env | default false __zoxide_hooked | get __zoxide_hooked)) {
|
||||
|
||||
# Jump to a directory using only keywords.
|
||||
def-env __zoxide_z [...rest:string] {
|
||||
# `z -` does not work yet, see https://github.com/nushell/nushell/issues/4769
|
||||
let arg0 = ($rest | append '~').0
|
||||
let path = if (($rest | length) <= 1) and ($arg0 == '-' or ($arg0 | path expand | path type) == dir) {
|
||||
$arg0
|
||||
|
Loading…
Reference in New Issue
Block a user