Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: release and publish to luarocks #92

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 42 additions & 1 deletion .github/workflows/action.yml → .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Neotest-go GitHub Actions
on:
[pull_request, workflow_dispatch]
push:
branches:
- master
pull_request: ~
jobs:
check-formatting:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -35,3 +38,41 @@ jobs:
nvim --version
nvim --headless -c ':PlenaryBustedDirectory lua/spec'

release:
name: release
if: ${{ github.ref == 'refs/heads/master' }}
needs:
- check-formatting
- tests
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 20
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release

luarocks-upload:
runs-on: ubuntu-22.04
needs: release
steps:
- uses: actions/checkout@v3
- name: Get Version
run: echo "LUAROCKS_VERSION=$(git fetch --tags; git describe --abbrev=0 --tags)" >> $GITHUB_ENV
- name: LuaRocks Upload
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

required to build the tree-sitter-go dependency.

Note: Users can install the binary package without having to compile by passing --server='https://nvim-neorocks.github.io/rocks-binaries/' to luarocks install (which is what rocks.nvim and lazy.nvim do by default).

Suggested change
- name: LuaRocks Upload
- name: Install C/C++ Compiler
uses: rlalik/setup-cpp-compiler@master
with:
compiler: clang-latest
- name: Install tree-sitter CLI
uses: baptiste0928/cargo-install@v3
with:
crate: tree-sitter-cli
- name: LuaRocks Upload

uses: nvim-neorocks/luarocks-tag-release@v5
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
uses: nvim-neorocks/luarocks-tag-release@v5
uses: nvim-neorocks/luarocks-tag-release@v7

env:
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
with:
version: ${{ env.LUAROCKS_VERSION }}
dependencies: |
plenary.nvim
nvim-nio
neotest
Comment on lines +75 to +78
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: luarocks (with rocks.nvim) is now capable of installing tree-sitter parsers.

Suggested change
dependencies: |
plenary.nvim
nvim-nio
neotest
dependencies: |
plenary.nvim
nvim-nio
neotest
tree-sitter-go

Loading