Skip to content

Commit 5b6a8a2

Browse files
committed
🎉 Initial
0 parents  commit 5b6a8a2

19 files changed

+1287
-0
lines changed

.github/FUNDING.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
custom:
3+
- "https://user-images.githubusercontent.com/32936898/199681341-1c5cfa61-4411-4b67-b268-7cd87c5867bb.png"
4+
- "https://user-images.githubusercontent.com/32936898/199681363-1094a0be-85ca-49cf-a410-19b3d7965120.png"
5+
- "https://user-images.githubusercontent.com/32936898/199681368-c34c2be7-e0d8-43ea-8c2c-d3e865da6aeb.png"

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
version: 2
3+
updates:
4+
- package-ecosystem: github-actions
5+
directory: /
6+
schedule:
7+
interval: monthly
8+
- package-ecosystem: gitsubmodule
9+
directory: /
10+
schedule:
11+
interval: monthly

.github/workflows/main.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
"on":
3+
push:
4+
paths-ignore:
5+
- "**.md"
6+
pull_request:
7+
paths-ignore:
8+
- "**.md"
9+
workflow_dispatch:
10+
11+
# https://github.com/softprops/action-gh-release/issues/236
12+
permissions:
13+
contents: write
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v3
20+
- uses: leafo/gh-actions-lua@v10
21+
- uses: leafo/gh-actions-luarocks@v4
22+
- name: Build
23+
run: |
24+
luarocks pack ./*.rockspec
25+
luarocks build
26+
luarocks pack prompt-style
27+
- uses: actions/upload-artifact@v3
28+
if: "! startsWith(github.ref, 'refs/tags/')"
29+
with:
30+
path: |
31+
*.rock
32+
- uses: softprops/action-gh-release@v1
33+
if: startsWith(github.ref, 'refs/tags/')
34+
with:
35+
# body_path: build/CHANGELOG.md
36+
files: |
37+
*.rock
38+
- name: Upload
39+
if: startsWith(github.ref, 'refs/tags/')
40+
run: |
41+
luarocks install luajson
42+
luarocks upload ./*.rockspec --api-key ${{secrets.LUAROCKS_API_KEY}}
43+
44+
deploy-aur:
45+
needs: build
46+
runs-on: ubuntu-latest
47+
if: startsWith(github.ref, 'refs/tags/')
48+
steps:
49+
- uses: Freed-Wu/update-aur-package@v1.0.11
50+
if: startsWith(github.ref, 'refs/tags/')
51+
with:
52+
package_name: lua-prompt-style
53+
ssh_private_key: ${{secrets.AUR_SSH_PRIVATE_KEY}}
54+
55+
deploy-nur:
56+
needs: build
57+
runs-on: ubuntu-latest
58+
if: startsWith(github.ref, 'refs/tags/')
59+
steps:
60+
- name: Trigger Workflow
61+
run: >
62+
curl -X POST -d '{"ref":"main"}'
63+
-H "Accept: application/vnd.github.v3+json"
64+
-H "Authorization: Bearer ${{secrets.GH_TOKEN}}"
65+
https://api.github.com/repos/Freed-Wu/nur-packages/actions/workflows/version.yml/dispatches

.gitignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/doc/
2+
# create by https://github.com/iamcco/coc-gitignore (Fri Jul 28 2023 12:33:41 GMT+0800 (China Standard Time))
3+
# Lua.gitignore:
4+
# Compiled Lua sources
5+
luac.out
6+
7+
# luarocks build files
8+
*.rock
9+
*.zip
10+
*.tar.gz
11+
12+
# Object files
13+
*.o
14+
*.os
15+
*.ko
16+
*.obj
17+
*.elf
18+
19+
# Precompiled Headers
20+
*.gch
21+
*.pch
22+
23+
# Libraries
24+
*.lib
25+
*.a
26+
*.la
27+
*.lo
28+
*.def
29+
*.exp
30+
31+
# Shared objects (inc. Windows DLLs)
32+
*.dll
33+
*.so
34+
*.so.*
35+
*.dylib
36+
37+
# Executables
38+
*.exe
39+
*.out
40+
*.app
41+
*.i*86
42+
*.x86_64
43+
*.hex

.gitlint

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env -S gitlint -C
2+
[ignore-by-title]
3+
regex=.*
4+
ignore=body-is-missing
5+
# ex: filetype=dosini

.pre-commit-config.yaml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
---
2+
repos:
3+
- repo: https://github.com/pre-commit/pre-commit-hooks
4+
rev: v4.4.0
5+
hooks:
6+
- id: check-added-large-files
7+
- id: fix-byte-order-marker
8+
- id: check-case-conflict
9+
- id: check-shebang-scripts-are-executable
10+
- id: check-merge-conflict
11+
- id: trailing-whitespace
12+
- id: mixed-line-ending
13+
- id: end-of-file-fixer
14+
- id: detect-private-key
15+
- id: check-symlinks
16+
- id: check-ast
17+
- id: debug-statements
18+
- id: requirements-txt-fixer
19+
- id: check-xml
20+
- id: check-yaml
21+
- id: check-toml
22+
- id: check-json
23+
- repo: https://github.com/Lucas-C/pre-commit-hooks
24+
rev: v1.5.1
25+
hooks:
26+
- id: remove-crlf
27+
- repo: https://github.com/codespell-project/codespell
28+
rev: v2.2.5
29+
hooks:
30+
- id: codespell
31+
additional_dependencies:
32+
- tomli
33+
- repo: https://github.com/jorisroovers/gitlint
34+
rev: v0.19.1
35+
hooks:
36+
- id: gitlint
37+
args:
38+
- --msg-filename
39+
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
40+
rev: 2.7.2
41+
hooks:
42+
- id: editorconfig-checker
43+
- repo: https://github.com/jumanjihouse/pre-commit-hooks
44+
rev: 3.0.0
45+
hooks:
46+
- id: check-mailmap
47+
- repo: https://github.com/rhysd/actionlint
48+
rev: v1.6.25
49+
hooks:
50+
- id: actionlint
51+
- repo: https://github.com/adrienverge/yamllint
52+
rev: v1.32.0
53+
hooks:
54+
- id: yamllint
55+
- repo: https://github.com/executablebooks/mdformat
56+
rev: 0.7.16
57+
hooks:
58+
- id: mdformat
59+
additional_dependencies:
60+
- mdformat-pyproject
61+
- mdformat-gfm
62+
- mdformat-myst
63+
- mdformat-toc
64+
- mdformat-deflist
65+
- mdformat-beautysh
66+
- mdformat-black
67+
- mdformat-config
68+
- repo: https://github.com/DavidAnson/markdownlint-cli2
69+
rev: v0.8.1
70+
hooks:
71+
- id: markdownlint-cli2
72+
additional_dependencies:
73+
- markdown-it-texmath@0.9.1
74+
- repo: https://github.com/scop/pre-commit-shfmt
75+
rev: v3.7.0-1
76+
hooks:
77+
- id: shfmt
78+
- repo: https://github.com/psf/black
79+
rev: 23.3.0
80+
hooks:
81+
- id: black
82+
- repo: https://github.com/PyCQA/isort
83+
rev: 5.12.0
84+
hooks:
85+
- id: isort
86+
- repo: https://github.com/pycqa/pydocstyle
87+
rev: 6.3.0
88+
hooks:
89+
- id: pydocstyle
90+
additional_dependencies:
91+
- tomli
92+
- repo: https://github.com/kumaraditya303/mirrors-pyright
93+
rev: v1.1.316
94+
hooks:
95+
- id: pyright
96+
- repo: https://github.com/PyCQA/bandit
97+
rev: 1.7.5
98+
hooks:
99+
- id: bandit
100+
additional_dependencies:
101+
- tomli
102+
- repo: https://github.com/Koihik/LuaFormatter
103+
rev: 29afe1046ad015de96ffdb6d361a21882356e801
104+
hooks:
105+
- id: luaformatter
106+
- repo: https://github.com/lunarmodules/luacheck
107+
rev: v1.1.1
108+
hooks:
109+
- id: luacheck

.readthedocs.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# https://docs.readthedocs.io/en/stable/config-file/v2.html
2+
---
3+
version: 2
4+
5+
build:
6+
os: ubuntu-22.04
7+
tools:
8+
python: "3"
9+
apt_packages:
10+
- lua-ldoc
11+
- lua-discount
12+
13+
formats:
14+
- htmlzip
15+
16+
python:
17+
install:
18+
- requirements: docs/requirements.txt

.yamllint.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env -S yamllint -c
2+
---
3+
extends: default
4+
5+
rules:
6+
comments:
7+
# https://github.com/prettier/prettier/issues/6780
8+
min-spaces-from-content: 1

0 commit comments

Comments
 (0)