-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (42 loc) · 2.57 KB
/
upgrade_fzf.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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