forked from nvim-lua/plenary.nvim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add luarocks upload release workflow
- Loading branch information
Showing
3 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: "release" | ||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
jobs: | ||
luarocks-upload: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: leafo/gh-actions-lua@v9 | ||
- uses: leafo/gh-actions-luarocks@v4 | ||
- name: Install dkjson | ||
run: luarocks install dkjson | ||
- name: Luarocks Upload | ||
run: make luarocks_upload |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) | ||
DEST_ROCKSPEC="$TMP_DIR/plenary.nvim-$MODREV-1.rockspec" | ||
cp "plenary.nvim-scm-1.rockspec" "$DEST_ROCKSPEC" | ||
sed -i "s/'scm'/'$MODREV'/g" "$DEST_ROCKSPEC" | ||
luarocks upload "$DEST_ROCKSPEC" --api-key="$LUAROCKS_API_KEY" |