-
-
Notifications
You must be signed in to change notification settings - Fork 30
91 lines (77 loc) · 2.62 KB
/
ci.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: CI
on:
push:
pull_request:
branches:
- main
jobs:
stylua:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Stylua
uses: JohnnyMorganz/stylua-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
args: --color always --check .
selene:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Selene
uses: AlejandroSuero/selene-linter-action@v1.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --display-style=quiet --config selene.toml .
version: 0.27.1
codespell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install codespell
run: pip install codespell
- name: Use codespell
run: make spell
generate-extras:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Neovim
uses: rhysd/action-setup-vim@v1
with:
neovim: true
version: stable
- name: Generate Extras
run: |
nvim -u NONE -E -R --headless --cmd "set rtp^=." --cmd "lua require('cyberdream.extra').generate_all_extras()" --cmd qa
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: generate extras"
generate-doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: panvimdoc
uses: kdheepak/panvimdoc@main
with:
vimdoc: cyberdream
version: "Neovim >= 0.9.0"
titledatepattern: "%Y"
demojify: true
treesitter: true
- name: Push changes
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "docs: auto-generate vimdoc"
release:
runs-on: ubuntu-latest
needs: [stylua, selene, codespell, generate-extras, generate-doc]
if: github.ref == 'refs/heads/main'
steps:
- uses: googleapis/release-please-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: simple