Merge pull request #2 from Diogo-ss/release-please--branches--main #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
push: | |
paths-ignore: | |
- "**/README.md" | |
- ".github/workflows/**" | |
- ".stylua.toml" | |
- ".gitignore" | |
branches: | |
- main | |
jobs: | |
check: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Luacheck linter | |
uses: lunarmodules/luacheck@v1 | |
with: | |
args: lua/* | |
- name: Stylua check | |
uses: JohnnyMorganz/stylua-action@v4 | |
with: | |
token: ${{ secrets.GH_TOKEN }} | |
version: latest | |
args: --color always --check lua/ | |
tests_doc: | |
runs-on: ubuntu-latest | |
needs: check | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install neovim | |
uses: MunifTanjim/setup-neovim-action@v1 | |
- name: Install Plenary and Tree-Sitter-Lua | |
run: | | |
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim | |
git clone --depth 1 https://github.com/tjdevries/tree-sitter-lua ~/.local/share/nvim/site/pack/vendor/start/tree-sitter-lua | |
ln -s $(pwd) ~/.local/share/nvim/site/pack/vendor/start | |
- name: Build parser | |
run: | | |
cd ~/.local/share/nvim/site/pack/vendor/start/tree-sitter-lua | |
make dist | |
cd - | |
- name: Run tests | |
run: make tests | |
- name: Generating docs | |
run: | | |
make docgen | |
- name: Commit files | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: "doc: auto-generate doc [action]" | |
commit_user_name: github-actions[bot] | |
commit_user_email: github-actions[bot]@users.noreply.github.com | |
commit_author: github-actions[bot] <github-actions[bot]@users.noreply.github.com> | |
create_branch: false | |
release: | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' | |
needs: tests_doc | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Create release | |
uses: google-github-actions/release-please-action@v4 | |
with: | |
token: ${{ secrets.GH_TOKEN }} | |
release-type: simple |