Release 0.1.0-1 #1
Workflow file for this run
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
name: Release Rock | |
on: | |
push: | |
tags: | |
- 'v*' # Trigger for version tags | |
jobs: | |
build_and_release: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Check out code | |
uses: actions/checkout@main | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Check if rockspec files are present | |
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." | |
exit 1 | |
fi | |
# Compare tag with version with VERSIOn | |
if [ "${GITHUB_REF}" != "refs/tags/v${VERSION}" ]; then | |
echo "Tag does not match version. Exiting." | |
exit 1 | |
fi | |
- name: Publish to LuaRocks | |
env: | |
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }} | |
run: | | |
ROCKSPEC_RELEASE_FILE="$(make release-info | grep -oP '^ROCKSPEC_RELEASE_FILE=\K.*')" | |
luarocks upload --temp-key="${LUAROCKS_API_KEY}" "${ROCKSPEC_RELEASE_FILE}" |