aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMarc Jakobi <mrcjkb89@outlook.com>2023-01-06 23:58:19 +0100
committerMatthieu Coudron <teto@users.noreply.github.com>2023-01-08 18:59:12 +0100
commit2df0fbdadd947cd2995566a0117b8802a9ba74f4 (patch)
tree438a2056daebdd70c4058d35b5e30a7bed5f1143 /scripts
parentdocs: fix typo (#2382) (diff)
downloadnvim-lspconfig-2df0fbdadd947cd2995566a0117b8802a9ba74f4.tar
nvim-lspconfig-2df0fbdadd947cd2995566a0117b8802a9ba74f4.tar.gz
nvim-lspconfig-2df0fbdadd947cd2995566a0117b8802a9ba74f4.tar.bz2
nvim-lspconfig-2df0fbdadd947cd2995566a0117b8802a9ba74f4.tar.lz
nvim-lspconfig-2df0fbdadd947cd2995566a0117b8802a9ba74f4.tar.xz
nvim-lspconfig-2df0fbdadd947cd2995566a0117b8802a9ba74f4.tar.zst
nvim-lspconfig-2df0fbdadd947cd2995566a0117b8802a9ba74f4.zip
ci: add luarocks upload release workflowv0.1.5
The recently added rockspec (see #2307) has to be prepared and uploaded to luarocks for each release. This adds an automated workflow for it, which has been tested with plenary.nvim. To be able to upload to luarocks, the owner of the luarocks account will have to add an API key named `LUAROCKS_API_KEY` to this repo's GitHub Actions secrets.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/luarocks-upload.sh10
-rw-r--r--scripts/test-luarocks-install.sh4
2 files changed, 14 insertions, 0 deletions
diff --git a/scripts/luarocks-upload.sh b/scripts/luarocks-upload.sh
new file mode 100644
index 00000000..8c4ff1f4
--- /dev/null
+++ b/scripts/luarocks-upload.sh
@@ -0,0 +1,10 @@
+#!/usr/bin/env bash
+
+# Expects the LUAROCKS_API_KEY secret to be set
+
+TMP_DIR=$(mktemp -d)
+MODREV=$(git describe --tags --always --first-parent | tr -d "v")
+DEST_ROCKSPEC="$TMP_DIR/nvim-lspconfig-$MODREV-1.rockspec"
+cp "nvim-lspconfig-scm-1.rockspec" "$DEST_ROCKSPEC"
+sed -i "s/= 'scm'/= '$MODREV'/g" "$DEST_ROCKSPEC"
+luarocks upload "$DEST_ROCKSPEC" --api-key="$LUAROCKS_API_KEY"
diff --git a/scripts/test-luarocks-install.sh b/scripts/test-luarocks-install.sh
new file mode 100644
index 00000000..8d8d3242
--- /dev/null
+++ b/scripts/test-luarocks-install.sh
@@ -0,0 +1,4 @@
+#!/usr/bin/env bash
+
+MODREV=$(git describe --tags --always --first-parent | tr -d "v")
+luarocks install "nvim-lspconfig" "$MODREV"