mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-21 23:01:05 +00:00
chore: release
This commit is contained in:
parent
3313f17954
commit
283f9377f2
4 changed files with 41 additions and 29 deletions
44
.github/workflows/release.yml
vendored
44
.github/workflows/release.yml
vendored
|
|
@ -6,8 +6,10 @@ on:
|
||||||
- "v[0-9]+.[0-9]+.[0-9]+"
|
- "v[0-9]+.[0-9]+.[0-9]+"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
release:
|
||||||
runs-on: ${{ matrix.os }}
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
|
@ -20,39 +22,47 @@ jobs:
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
target: aarch64-apple-darwin
|
target: aarch64-apple-darwin
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- 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
|
uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cargo build --release --locked --target ${{ matrix.target }}
|
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'
|
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
|
||||||
env:
|
env:
|
||||||
RELEASE_NAME: yazi-${{ matrix.target }}
|
TARGET_NAME: yazi-${{ matrix.target }}
|
||||||
run: |
|
run: |
|
||||||
mkdir $RELEASE_NAME
|
mkdir $TARGET_NAME
|
||||||
cp target/${{ matrix.target }}/release/yazi $RELEASE_NAME
|
cp target/${{ matrix.target }}/release/yazi $TARGET_NAME
|
||||||
cp -r config/completions $RELEASE_NAME
|
cp -r config/completions $TARGET_NAME
|
||||||
cp README.md LICENSE $RELEASE_NAME
|
cp README.md LICENSE $TARGET_NAME
|
||||||
zip -r $RELEASE_NAME.zip $RELEASE_NAME
|
zip -r $TARGET_NAME.zip $TARGET_NAME
|
||||||
|
|
||||||
- name: Pack Artifacts [Windows]
|
- name: Pack artifacts [Windows]
|
||||||
if: matrix.os == 'windows-latest'
|
if: matrix.os == 'windows-latest'
|
||||||
env:
|
env:
|
||||||
RELEASE_NAME: yazi-${{ matrix.target }}
|
TARGET_NAME: yazi-${{ matrix.target }}
|
||||||
run: |
|
run: |
|
||||||
New-Item -ItemType Directory -Path ${env:RELEASE_NAME}
|
New-Item -ItemType Directory -Path ${env:TARGET_NAME}
|
||||||
Copy-Item -Path "target\${{ matrix.target }}\release\yazi.exe" -Destination ${env:RELEASE_NAME}
|
Copy-Item -Path "target\${{ matrix.target }}\release\yazi.exe" -Destination ${env:TARGET_NAME}
|
||||||
Copy-Item -Path "config\completions" -Destination ${env:RELEASE_NAME} -Recurse
|
Copy-Item -Path "config\completions" -Destination ${env:TARGET_NAME} -Recurse
|
||||||
Copy-Item -Path "README.md", "LICENSE" -Destination ${env:RELEASE_NAME}
|
Copy-Item -Path "README.md", "LICENSE" -Destination ${env:TARGET_NAME}
|
||||||
Compress-Archive -Path ${env:RELEASE_NAME} -DestinationPath "${env:RELEASE_NAME}.zip"
|
Compress-Archive -Path ${env:TARGET_NAME} -DestinationPath "${env:TARGET_NAME}.zip"
|
||||||
|
|
||||||
- name: Release
|
- name: Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
with:
|
with:
|
||||||
|
draft: true
|
||||||
files: yazi-${{ matrix.target }}.zip
|
files: yazi-${{ matrix.target }}.zip
|
||||||
|
generate_release_notes: true
|
||||||
|
|
|
||||||
20
.github/workflows/test.yml
vendored
20
.github/workflows/test.yml
vendored
|
|
@ -10,21 +10,21 @@ env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
test:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Cache Dependencies
|
- name: Cache dependencies
|
||||||
uses: Swatinem/rust-cache@v2
|
uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cargo build --verbose
|
run: cargo build --verbose
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: cargo test --verbose
|
run: cargo test --verbose
|
||||||
|
|
|
||||||
|
|
@ -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":[]}
|
||||||
|
|
|
||||||
|
|
@ -59,9 +59,11 @@ function Folder:linemode(area)
|
||||||
elseif mode == "permissions" then
|
elseif mode == "permissions" then
|
||||||
spans[#spans + 1] = ui.Span(f:permissions() or "")
|
spans[#spans + 1] = ui.Span(f:permissions() or "")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
spans[#spans + 1] = ui.Span(" ")
|
||||||
lines[#lines + 1] = ui.Line(spans)
|
lines[#lines + 1] = ui.Line(spans)
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
function Folder:markers(area, markers)
|
function Folder:markers(area, markers)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue