Skip to content

Commit ad0605e

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

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,18 @@ jobs:
1414
- name: Set up Docker Buildx
1515
uses: docker/setup-buildx-action@v3
1616
- name: Check if rockspec files are present
17+
env:
18+
REF_NAME: ${{ github.ref_name }}
1719
run: |
1820
VERSION="$(make release-info | grep -oP '^VERSION=\K.*')"
1921
ROCKSPEC_RELEASE_FILE="$(make release-info | grep -oP '^ROCKSPEC_RELEASE_FILE=\K.*')"
2022
if [ ! -f "${ROCKSPEC_RELEASE_FILE}" ]; then
21-
echo "No rockspec files found. Exiting."
23+
echo "No ${ROCKSPEC_RELEASE_FILE} file found. Exiting."
2224
exit 1
2325
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."
26+
# Compare tag with version with VERSION
27+
if [ "${REF_NAME}" != "v${VERSION}" ]; then
28+
echo "${REF_NAME} does not match version v${VERSION}. Exiting."
2729
exit 1
2830
fi
2931
- name: Publish to LuaRocks

0 commit comments

Comments
 (0)