Skip to content

Commit

Permalink
ci: add rock workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Aire-One committed Oct 25, 2024
1 parent b2d65fd commit 4468697
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"enableGlobDot": true,
"words": [
"Aire-One",
"apikey",
"capi",
"constructorfct",
"dbus",
Expand All @@ -17,6 +18,7 @@
"JohnnyMorganz",
"keygrabber",
"ldoc",
"leafo",
"luacheck",
"luacheckrc",
"luadoc",
Expand All @@ -26,6 +28,7 @@
"mousebindings",
"mousegrabber",
"rockspec",
"rockspecs",
"staticfct",
"stylua"
]
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
21 changes: 21 additions & 0 deletions .github/workflows/rock.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
6 changes: 6 additions & 0 deletions awesome-slot-dev-1.rockspec
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
rockspec_format = "3.0"
package = "awesome-slot"
version = "dev-1"
source = {
Expand All @@ -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",
Expand Down

0 comments on commit 4468697

Please sign in to comment.