Skip to content

Commit

Permalink
chore: release
Browse files Browse the repository at this point in the history
  • Loading branch information
sxyazi committed Oct 21, 2023
1 parent 3313f17 commit 283f937
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 29 deletions.
44 changes: 27 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ on:
- "v[0-9]+.[0-9]+.[0-9]+"

jobs:
publish:
runs-on: ${{ matrix.os }}
release:
permissions:
contents: write

strategy:
matrix:
include:
Expand All @@ -20,39 +22,47 @@ jobs:
- os: macos-latest
target: aarch64-apple-darwin

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3

- name: Cache Dependencies
- name: Add aarch64 target
if: matrix.target == 'aarch64-apple-darwin'
run: rustup target add aarch64-apple-darwin

- name: Cache dependencies
uses: Swatinem/rust-cache@v2

- name: Build
run: cargo build --release --locked --target ${{ matrix.target }}

- name: Pack Artifacts [Linux & macOS]
- name: Pack artifacts [Linux & macOS]
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
env:
RELEASE_NAME: yazi-${{ matrix.target }}
TARGET_NAME: yazi-${{ matrix.target }}
run: |
mkdir $RELEASE_NAME
cp target/${{ matrix.target }}/release/yazi $RELEASE_NAME
cp -r config/completions $RELEASE_NAME
cp README.md LICENSE $RELEASE_NAME
zip -r $RELEASE_NAME.zip $RELEASE_NAME
mkdir $TARGET_NAME
cp target/${{ matrix.target }}/release/yazi $TARGET_NAME
cp -r config/completions $TARGET_NAME
cp README.md LICENSE $TARGET_NAME
zip -r $TARGET_NAME.zip $TARGET_NAME
- name: Pack Artifacts [Windows]
- name: Pack artifacts [Windows]
if: matrix.os == 'windows-latest'
env:
RELEASE_NAME: yazi-${{ matrix.target }}
TARGET_NAME: yazi-${{ matrix.target }}
run: |
New-Item -ItemType Directory -Path ${env:RELEASE_NAME}
Copy-Item -Path "target\${{ matrix.target }}\release\yazi.exe" -Destination ${env:RELEASE_NAME}
Copy-Item -Path "config\completions" -Destination ${env:RELEASE_NAME} -Recurse
Copy-Item -Path "README.md", "LICENSE" -Destination ${env:RELEASE_NAME}
Compress-Archive -Path ${env:RELEASE_NAME} -DestinationPath "${env:RELEASE_NAME}.zip"
New-Item -ItemType Directory -Path ${env:TARGET_NAME}
Copy-Item -Path "target\${{ matrix.target }}\release\yazi.exe" -Destination ${env:TARGET_NAME}
Copy-Item -Path "config\completions" -Destination ${env:TARGET_NAME} -Recurse
Copy-Item -Path "README.md", "LICENSE" -Destination ${env:TARGET_NAME}
Compress-Archive -Path ${env:TARGET_NAME} -DestinationPath "${env:TARGET_NAME}.zip"
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
files: yazi-${{ matrix.target }}.zip
generate_release_notes: true
20 changes: 10 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ env:
CARGO_TERM_COLOR: always

jobs:
build:
test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3

- name: Cache Dependencies
uses: Swatinem/rust-cache@v2
- name: Cache dependencies
uses: Swatinem/rust-cache@v2

- name: Build
run: cargo build --verbose
- name: Build
run: cargo build --verbose

- name: Run tests
run: cargo test --verbose
- name: Run tests
run: cargo test --verbose
2 changes: 1 addition & 1 deletion cspell.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"0.2","language":"en","words":["Punct","KEYMAP","splitn","crossterm","YAZI","unar","peekable","ratatui","syntect","pbpaste","pbcopy","ffmpegthumbnailer","oneshot","Posix","Lsar","XADDOS","zoxide","cands","Deque","precache","imageops","IFBLK","IFCHR","IFDIR","IFIFO","IFLNK","IFMT","IFSOCK","IRGRP","IROTH","IRUSR","ISGID","ISUID","ISVTX","IWGRP","IWOTH","IWUSR","IXGRP","IXOTH","IXUSR","libc","winsize","TIOCGWINSZ","xpixel","ypixel","ioerr","appender","Catppuccin","macchiato","gitmodules","Dotfiles","bashprofile","vimrc","flac","webp","exiftool","mediainfo","ripgrep","nvim","indexmap","indexmap","unwatch","canonicalize","serde","fsevent","Ueberzug","iterm","wezterm","sixel","chafa","ueberzugpp","️ Überzug","️ Überzug","Konsole","Alacritty","Überzug","pkgs","paru","unarchiver","pdftoppm","poppler","prebuild","singlefile","jpegopt","EXIF","rustfmt","mktemp","nanos","xclip","xsel","natord","Mintty","nixos","nixpkgs","SIGTSTP","SIGCONT","SIGCONT","mlua","nonstatic","userdata","metatable","natsort","backstack","luajit","Succ","Succ","cand","fileencoding","foldmethod","lightgreen","darkgray","lightred","lightyellow","lightcyan","nushell","msvc","aarch"],"flagWords":[]}
{"version":"0.2","language":"en","words":["Punct","KEYMAP","splitn","crossterm","YAZI","unar","peekable","ratatui","syntect","pbpaste","pbcopy","ffmpegthumbnailer","oneshot","Posix","Lsar","XADDOS","zoxide","cands","Deque","precache","imageops","IFBLK","IFCHR","IFDIR","IFIFO","IFLNK","IFMT","IFSOCK","IRGRP","IROTH","IRUSR","ISGID","ISUID","ISVTX","IWGRP","IWOTH","IWUSR","IXGRP","IXOTH","IXUSR","libc","winsize","TIOCGWINSZ","xpixel","ypixel","ioerr","appender","Catppuccin","macchiato","gitmodules","Dotfiles","bashprofile","vimrc","flac","webp","exiftool","mediainfo","ripgrep","nvim","indexmap","indexmap","unwatch","canonicalize","serde","fsevent","Ueberzug","iterm","wezterm","sixel","chafa","ueberzugpp","️ Überzug","️ Überzug","Konsole","Alacritty","Überzug","pkgs","paru","unarchiver","pdftoppm","poppler","prebuild","singlefile","jpegopt","EXIF","rustfmt","mktemp","nanos","xclip","xsel","natord","Mintty","nixos","nixpkgs","SIGTSTP","SIGCONT","SIGCONT","mlua","nonstatic","userdata","metatable","natsort","backstack","luajit","Succ","Succ","cand","fileencoding","foldmethod","lightgreen","darkgray","lightred","lightyellow","lightcyan","nushell","msvc","aarch","linemode"],"flagWords":[]}
4 changes: 3 additions & 1 deletion plugin/preset/components/folder.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,11 @@ function Folder:linemode(area)
elseif mode == "permissions" then
spans[#spans + 1] = ui.Span(f:permissions() or "")
end

spans[#spans + 1] = ui.Span(" ")
lines[#lines + 1] = ui.Line(spans)
end
return ui.Paragraph(area:padding(ui.Padding.right(1)), lines):align(ui.Alignment.RIGHT)
return ui.Paragraph(area, lines):align(ui.Alignment.RIGHT)
end

function Folder:markers(area, markers)
Expand Down

0 comments on commit 283f937

Please sign in to comment.