Skip to content

Commit

Permalink
build: Fix release action when comparing tag and version
Browse files Browse the repository at this point in the history
  • Loading branch information
dol committed Jan 6, 2025
1 parent bdbd597 commit ab6bca8
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,18 @@ jobs:
run: |
VERSION="$(make release-info | grep -oP '^VERSION=\K.*')"
ROCKSPEC_RELEASE_FILE="$(make release-info | grep -oP '^ROCKSPEC_RELEASE_FILE=\K.*')"
if [ ! -f "${ROCKSPEC_RELEASE_FILE}" ]; then
echo "No rockspec files found. Exiting."
echo "No ${ROCKSPEC_RELEASE_FILE} file found. Exiting."
exit 1
fi
# Compare tag with version with VERSIOn
if [ "${GITHUB_REF}" != "refs/tags/v${VERSION}" ]; then
echo "Tag does not match version. Exiting."
# Compare tag with version with VERSION
if [ "${{ github.ref_name }}" != "${VERSION}" ]; then
echo "${{ github.ref_name }} does not match version ${VERSION}. Exiting."
exit 1
fi
- uses: leafo/gh-actions-lua@v10
- uses: leafo/gh-actions-luarocks@v4
- name: Publish to LuaRocks
env:
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
Expand Down

0 comments on commit ab6bca8

Please sign in to comment.