Skip to content

Commit

Permalink
Preparations for the release of v0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Henkoglobin committed Jun 30, 2024
1 parent 782a6ce commit 68ba088
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 4 deletions.
27 changes: 23 additions & 4 deletions .github/workflows/test-and-publish.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
name: test-and-publish
on: [push, pull_request]
on:
push:
branches:
- main
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
pull_request:

jobs:
# TODO: Tests don't seem to run for 5.1 and 5.2 due to some weirdness...
tests-51:
uses: ./.github/workflows/run-tests.yml
with:
Expand Down Expand Up @@ -36,7 +41,21 @@ jobs:
- name: Install dkjson
run: |
luarocks install dkjson
- name: Publish to LuaRocks
- name: Publish dev version to LuaRocks
if: ${{ github.ref == 'refs/heads/main' }}
run: |
luarocks upload lazylualinq-dev-1.rockspec --force --api-key=${{ secrets.LUAROCKS_API_KEY }}
if: ${{ github.ref == 'refs/heads/main' }}
- name: Extract version from tag
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
id: extract-version
run: |
echo "VERSION=$(echo ${{ github.ref_name }} | cut -c 2-)" >> "$GITHUB_OUTPUT"
- name: Fail run if there's no valid rockspec
if: ${{ startsWith(github.ref, 'refs/tags/v') && hashFiles(format('lazylualinq-{0}.rockspec', steps.extract-version.outputs.VERSION)) == '' }}
run: |
exit 1
- name: Publish release version to LuaRocks
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
run: |
luarocks upload lazylualinq-${{ steps.extract-version.outputs.VERSION }}.rockspec --api-key=${{ secrets.LUAROCKS_API_KEY }}
27 changes: 27 additions & 0 deletions lazylualinq-0.1.0.rockspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package = "lazylualinq"
rockspec_format = "3.0"
version = "0.1.0"
source = {
url = "git://github.com/Henkoglobin/lazylualinq",
tag = "v0.1.0"
}
description = {
summary = "LazyLuaLinq provides a simple, lazy implementation of linq-like functions for Lua.",
detailed = [[
LazyLuaLinq provides a simple, lazy implementation of linq-like functions for Lua.
With LazyLuaLinq, you can implement data transformation in elegant,
expressive queries akin to SQL.
]],
homepage = "https://henkoglobin.github.io/lazylualinq",
license = "Unlicense"
}
dependencies = {
"lua >= 5.1, < 5.5"
}
build = {
type = "builtin",
modules = {
["lazylualinq"] = "src/lazylualinq.lua",
["lazylualinq.ordering"] = "src/lazylualinq/ordering.lua",
}
}

0 comments on commit 68ba088

Please sign in to comment.