Skip to content

Commit a867539

Browse files
committed
build: Fix release action when comparing tag and version
1 parent bdbd597 commit a867539

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,20 @@ jobs:
1717
run: |
1818
VERSION="$(make release-info | grep -oP '^VERSION=\K.*')"
1919
ROCKSPEC_RELEASE_FILE="$(make release-info | grep -oP '^ROCKSPEC_RELEASE_FILE=\K.*')"
20+
2021
if [ ! -f "${ROCKSPEC_RELEASE_FILE}" ]; then
21-
echo "No rockspec files found. Exiting."
22+
echo "No ${ROCKSPEC_RELEASE_FILE} file found. Exiting."
2223
exit 1
2324
fi
24-
# Compare tag with version with VERSIOn
25-
if [ "${GITHUB_REF}" != "refs/tags/v${VERSION}" ]; then
26-
echo "Tag does not match version. Exiting."
25+
# Compare tag with version with VERSION
26+
if [ "${{ github.ref_name }}" != "${VERSION}" ]; then
27+
echo "${{ github.ref_name }} does not match version ${VERSION}. Exiting."
2728
exit 1
2829
fi
30+
- uses: leafo/gh-actions-lua@v10
31+
- uses: leafo/gh-actions-luarocks@v4
32+
- name: Set up LuaRocks
33+
run: luarocks install dkjson
2934
- name: Publish to LuaRocks
3035
env:
3136
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}

0 commit comments

Comments
 (0)