-
Notifications
You must be signed in to change notification settings - Fork 12
37 lines (33 loc) · 1.37 KB
/
build.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
name: Build sources
on: push
jobs:
build-sources:
name: Build symbol sources
runs-on: ubuntu-latest
if: github.ref != 'master'
steps:
- uses: actions/checkout@v2
- name: Prepare
run: |
sudo apt-get update
sudo add-apt-repository universe
wget https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage
chmod u+x nvim.appimage
mkdir -p ~/.local/share/nvim/site/pack/vendor/start
ln -s $(pwd) ~/.local/share/nvim/site/pack/vendor/start
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim
# inspired by nvim-lspconfigs
- name: Build sources
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMIT_MSG: |
[Actions] Build sources
skip-checks: true
run: |
git config user.email "actions@github"
git config user.name "Github Actions"
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
./nvim.appimage --headless -c "luafile ./script/downloader.lua" -c "q"
git add data/
# Only commit and push if we have changes
git diff --quiet && git diff --staged --quiet || (git commit -m "${COMMIT_MSG}"; git push origin HEAD:${GITHUB_REF})