Skip to content

Upgrade fzf

Upgrade fzf #22

Workflow file for this run

name: Upgrade fzf
on:
[workflow_dispatch]
jobs:
upgrade:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Download and extract tarballs
run: |
nameregex='^fzf-\d[\d.]+?\d?-linux_amd64\.tar\.gz$'
wget -q "$(curl -s https://api.github.com/repos/junegunn/fzf/releases/latest | jq -r '.assets[] | select(.name|test($name)).browser_download_url' --arg name "${nameregex}")"
tar --wildcards -C bin/x86_64 -xf fzf-*-linux_amd64.tar.gz
rm fzf-*-linux_amd64.tar.gz
nameregex='^fzf-\d[\d.]+?\d?-linux_arm64\.tar\.gz$'
wget -q "$(curl -s https://api.github.com/repos/junegunn/fzf/releases/latest | jq -r '.assets[] | select(.name|test($name)).browser_download_url' --arg name "${nameregex}")"
tar --wildcards -C bin/aarch64 -xf fzf-*-linux_arm64.tar.gz
rm fzf-*-linux_arm64.tar.gz
nameregex='^fzf-\d[\d.]+?\d?-linux_armv7\.tar\.gz$'
wget -q "$(curl -s https://api.github.com/repos/junegunn/fzf/releases/latest | jq -r '.assets[] | select(.name|test($name)).browser_download_url' --arg name "${nameregex}")"
tar --wildcards -C bin/armv7l -xf fzf-*-linux_armv7.tar.gz
rm fzf-*-linux_armv7.tar.gz
wget -q https://github.com/junegunn/fzf/raw/master/man/man1/fzf.1 -O bin/man/man1/fzf.1
wget -q https://github.com/junegunn/fzf/raw/master/man/man1/fzf-tmux.1 -O bin/man/man1/fzf-tmux.1
gzip -f bin/man/man1/fzf{,-tmux}.1
wget -q https://github.com/junegunn/fzf/raw/master/bin/fzf-tmux -O bin/scripts/fzf-tmux
chmod +x bin/scripts/fzf-tmux
wget -q https://github.com/junegunn/fzf/raw/master/shell/completion.bash -O bin/bash-completions/fzf-completions.bash
wget -q https://github.com/junegunn/fzf/raw/master/shell/key-bindings.bash -O bin/bash-completions/fzf-keybindings.bash
wget -q https://github.com/junegunn/fzf/raw/master/shell/completion.zsh -O bin/zsh-completions/fzf-completions.zsh
wget -q https://github.com/junegunn/fzf/raw/master/shell/key-bindings.zsh -O bin/zsh-completions/fzf-keybindings.zsh
- name: Commit and push to repository
run: |
git config --global user.name "eggbean"
git config --global user.email 815311+eggbean@users.noreply.github.com
git add --all
git status
tag="$(curl -s https://api.github.com/repos/junegunn/fzf/releases/latest | jq -r '.tag_name')"
git commit -m "[Action] Upgrade fzf to ${tag}"
git push