From 44686975f4ed27e236c14d7ecd6879b5319a4b39 Mon Sep 17 00:00:00 2001 From: Aire-One Date: Fri, 25 Oct 2024 02:54:44 +0200 Subject: [PATCH] ci: add rock workflow --- .cspell.json | 3 +++ .github/workflows/lint.yaml | 8 ++++++++ .github/workflows/rock.yaml | 21 +++++++++++++++++++++ Makefile | 5 ++++- awesome-slot-dev-1.rockspec | 6 ++++++ 5 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/rock.yaml diff --git a/.cspell.json b/.cspell.json index b4b0e04..8f98d0f 100644 --- a/.cspell.json +++ b/.cspell.json @@ -6,6 +6,7 @@ "enableGlobDot": true, "words": [ "Aire-One", + "apikey", "capi", "constructorfct", "dbus", @@ -17,6 +18,7 @@ "JohnnyMorganz", "keygrabber", "ldoc", + "leafo", "luacheck", "luacheckrc", "luadoc", @@ -26,6 +28,7 @@ "mousebindings", "mousegrabber", "rockspec", + "rockspecs", "staticfct", "stylua" ] diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 36442cf..3c82f12 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -41,3 +41,11 @@ jobs: - uses: streetsidesoftware/cspell-action@v6 with: incremental_files_only: false + + rockspec: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: leafo/gh-actions-lua@v9 + - uses: leafo/gh-actions-luarocks@v4 + - run: luarocks lint awesome-slot-dev-1.rockspec diff --git a/.github/workflows/rock.yaml b/.github/workflows/rock.yaml new file mode 100644 index 0000000..853be04 --- /dev/null +++ b/.github/workflows/rock.yaml @@ -0,0 +1,21 @@ +name: Upload rock to LuaRocks + +on: + push: + +jobs: + affected: + uses: lunarmodules/.github/.github/workflows/list_affected_rockspecs.yml@main + upload: + needs: affected + if: >- + ${{ + github.repository == 'Aire-One/awesome-slot' && + ( github.ref_name == 'master' || startsWith(github.ref, 'refs/tags/') ) && + needs.affected.outputs.rockspecs + }} + uses: lunarmodules/.github/.github/workflows/upload_to_luarocks.yml@main + with: + rockspecs: ${{ needs.affected.outputs.rockspecs }} + secrets: + apikey: ${{ secrets.LUAROCKS_APIKEY }} diff --git a/Makefile b/Makefile index f516cbd..b0db17d 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,10 @@ ldoc-dryrun: cspell: cspell lint . -lint: luacheck stylua ldoc-dryrun cspell +lint-rockspec: + luarocks lint awesome-slot-dev-1.rockspec + +lint: luacheck stylua ldoc-dryrun cspell lint-rockspec ldoc: ldoc . diff --git a/awesome-slot-dev-1.rockspec b/awesome-slot-dev-1.rockspec index 828ece1..fad9637 100644 --- a/awesome-slot-dev-1.rockspec +++ b/awesome-slot-dev-1.rockspec @@ -1,3 +1,4 @@ +rockspec_format = "3.0" package = "awesome-slot" version = "dev-1" source = { @@ -8,6 +9,11 @@ description = { detailed = "A declarative API to connect signals for the AwesomeWM.", homepage = "https://github.com/Aire-One/awesome-slot", license = "*** please specify a license ***", + labels = { + "awesome", + "signals", + "declarative", + }, } build = { type = "builtin",