From baed6439e22aa4d1302a0c2acb1eb4a5824b1d23 Mon Sep 17 00:00:00 2001 From: Matthieu Coudron <886074+teto@users.noreply.github.com> Date: Sun, 30 Jul 2023 21:07:18 +0200 Subject: ci: fix luarocks tag release process bumped version of the action Co-authored-by: Marc Jakobi --- .github/workflows/release.yml | 17 +++++++++--- contrib/nvim-treesitter-luarocks.template | 45 +++++++++++++++++++++++++++++++ contrib/nvim-treesitter-scm-1.rockspec | 36 +++++++++++++++++++++++++ nvim-treesitter-scm-1.rockspec | 36 ------------------------- 4 files changed, 94 insertions(+), 40 deletions(-) create mode 100644 contrib/nvim-treesitter-luarocks.template create mode 100644 contrib/nvim-treesitter-scm-1.rockspec delete mode 100644 nvim-treesitter-scm-1.rockspec diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 03b4d4e35..99e9c6e27 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,17 +1,26 @@ name: "release" on: push: - tags: - - '*' + tags: # Will upload to luarocks.org + - "*" + pull_request: # Will test a local install without uploading to luarocks.org + paths: + - 'contrib/*.rockspec' + - .github/workflows/release.yml + jobs: luarocks-upload: runs-on: ubuntu-latest steps: - - uses: nvim-neorocks/luarocks-tag-release@v2.2.0 + - uses: actions/checkout@v3 + - uses: nvim-neorocks/luarocks-tag-release@v5 env: LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }} with: + name: nvim-treesitter + version: 0.1 + license: apache 2 detailed_description: | The goal of nvim-treesitter is both to provide a simple and easy way to use the interface for tree-sitter in Neovim and to provide some basic functionality such as highlighting based on it. - build_type: "make" + template: contrib/nvim-treesitter-luarocks.template diff --git a/contrib/nvim-treesitter-luarocks.template b/contrib/nvim-treesitter-luarocks.template new file mode 100644 index 000000000..3bb15d3b2 --- /dev/null +++ b/contrib/nvim-treesitter-luarocks.template @@ -0,0 +1,45 @@ +local git_ref = '$git_ref' +local modrev = '$modrev' +local specrev = '-1' + +local repo_url = '$repo_url' + +rockspec_format = '3.0' +package = '$package' +version = modrev .. specrev + +description = { + summary = 'Nvim Treesitter configurations and abstraction layer', + detailed = $detailed_description, + labels = { 'neovim' }, + homepage = 'https://github.com/nvim-treesitter/nvim-treesitter', + license = 'Apache-2.0', +} + +dependencies = { + 'lua >= 5.1', +} + +-- source = file:///. + +source = { + url = repo_url .. '/archive/' .. git_ref .. '.zip', + dir = '$repo_name-' .. '$archive_dir_suffix', +} + +build = { + type = 'make', + build_pass = false, + install_variables = { + INST_PREFIX='$(PREFIX)', + INST_BINDIR='$(BINDIR)', + INST_LIBDIR='$(LIBDIR)', + INST_LUADIR='$(LUADIR)', + INST_CONFDIR='$(CONFDIR)', + }, + copy_directories = { + 'autoload', + 'plugin', + 'queries' + } +} diff --git a/contrib/nvim-treesitter-scm-1.rockspec b/contrib/nvim-treesitter-scm-1.rockspec new file mode 100644 index 000000000..a901c5b12 --- /dev/null +++ b/contrib/nvim-treesitter-scm-1.rockspec @@ -0,0 +1,36 @@ +local MODREV, SPECREV = 'scm', '-1' +rockspec_format = '3.0' +package = 'nvim-treesitter' +version = MODREV .. SPECREV + +description = { + summary = 'Nvim Treesitter configurations and abstraction layer', + labels = { 'neovim' }, + homepage = 'https://github.com/nvim-treesitter/nvim-treesitter', + license = 'Apache-2.0', +} + +dependencies = { + 'lua >= 5.1', +} + +source = { + url = 'git://github.com/nvim-treesitter/nvim-treesitter', +} + +build = { + type = 'make', + install_variables = { + INST_PREFIX='$(PREFIX)', + INST_BINDIR='$(BINDIR)', + INST_LIBDIR='$(LIBDIR)', + INST_LUADIR='$(LUADIR)', + INST_CONFDIR='$(CONFDIR)', + }, + copy_directories = { + 'autoload', + 'doc', + 'plugin', + 'queries' + } +} diff --git a/nvim-treesitter-scm-1.rockspec b/nvim-treesitter-scm-1.rockspec deleted file mode 100644 index a901c5b12..000000000 --- a/nvim-treesitter-scm-1.rockspec +++ /dev/null @@ -1,36 +0,0 @@ -local MODREV, SPECREV = 'scm', '-1' -rockspec_format = '3.0' -package = 'nvim-treesitter' -version = MODREV .. SPECREV - -description = { - summary = 'Nvim Treesitter configurations and abstraction layer', - labels = { 'neovim' }, - homepage = 'https://github.com/nvim-treesitter/nvim-treesitter', - license = 'Apache-2.0', -} - -dependencies = { - 'lua >= 5.1', -} - -source = { - url = 'git://github.com/nvim-treesitter/nvim-treesitter', -} - -build = { - type = 'make', - install_variables = { - INST_PREFIX='$(PREFIX)', - INST_BINDIR='$(BINDIR)', - INST_LIBDIR='$(LIBDIR)', - INST_LUADIR='$(LUADIR)', - INST_CONFDIR='$(CONFDIR)', - }, - copy_directories = { - 'autoload', - 'doc', - 'plugin', - 'queries' - } -} -- cgit v1.2.3-70-g09d2