Skip to content

Commit ffe2ef4

Browse files
author
BirdeeHub
committed
ci(workflows): preparing github CI
1 parent 53525f4 commit ffe2ef4

File tree

6 files changed

+145
-0
lines changed

6 files changed

+145
-0
lines changed

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
version: 2
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"

.github/rockspec.template

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
local git_ref = '$git_ref'
2+
local modrev = '$modrev'
3+
local specrev = '$specrev'
4+
5+
local repo_url = '$repo_url'
6+
7+
rockspec_format = '3.0'
8+
package = '$package'
9+
version = modrev ..'-'.. specrev
10+
11+
description = {
12+
summary = '$summary',
13+
detailed = $detailed_description,
14+
labels = $labels,
15+
homepage = '$homepage',
16+
$license
17+
}
18+
19+
dependencies = $dependencies
20+
21+
test_dependencies = $test_dependencies
22+
23+
source = {
24+
url = repo_url .. '/archive/' .. git_ref .. '.zip',
25+
dir = '$repo_name-' .. '$archive_dir_suffix',
26+
}
27+
28+
if modrev == 'scm' or modrev == 'dev' then
29+
source = {
30+
url = repo_url:gsub('https', 'git')
31+
}
32+
end
33+
34+
build = {
35+
type = "make",
36+
copy_directories = $copy_directories,
37+
build_variables = {
38+
LUA_INCDIR="$(LUA_INCDIR)",
39+
},
40+
install_variables = {
41+
LIBDIR="$(LIBDIR)",
42+
},
43+
}

.github/workflows/luarocks.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
name: Push to LuaRocks
3+
4+
on:
5+
push:
6+
tags:
7+
- '*'
8+
release:
9+
types:
10+
- created
11+
pull_request:
12+
workflow_dispatch:
13+
14+
jobs:
15+
luarocks-release:
16+
runs-on: ubuntu-latest
17+
name: Release
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0 # Required to count the commits
23+
- name: Get Version
24+
run: echo "LUAROCKS_VERSION=$(git describe --abbrev=0 --tags)" >> $GITHUB_ENV
25+
- name: Luarocks Upload
26+
uses: nvim-neorocks/luarocks-tag-release@v7
27+
env:
28+
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
29+
with:
30+
template: "/.github/rockspec.template"
31+
version: ${{ env.LUAROCKS_VERSION }}
32+
detailed_description: |
33+
Speedy toml parsing for lua, implemented in C
34+
for use in hot-path or startup-time parsing of toml files.

.github/workflows/nix-build.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: "Nix build"
2+
on:
3+
pull_request:
4+
push:
5+
jobs:
6+
checks:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- uses: DeterminateSystems/nix-installer-action@v16
11+
- run: nix flake check -Lv
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
permissions:
3+
contents: write
4+
pull-requests: write
5+
6+
name: Release Please
7+
8+
on:
9+
workflow_dispatch:
10+
push:
11+
branches:
12+
- master
13+
14+
jobs:
15+
release:
16+
name: release
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: googleapis/release-please-action@v4
20+
with:
21+
release-type: simple
22+
token: ${{ secrets.PAT }}

.github/workflows/update.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: update-flake-lock
2+
on:
3+
workflow_dispatch: # allows manual triggering
4+
schedule:
5+
- cron: '0 0 * * 0' # runs weekly on Sunday at 00:00
6+
7+
jobs:
8+
lockfile:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v4
13+
- name: Install Nix
14+
uses: DeterminateSystems/nix-installer-action@main
15+
- name: Update flake.lock
16+
uses: DeterminateSystems/update-flake-lock@main
17+
with:
18+
token: ${{ secrets.PAT }}
19+
pr-title: "chore(deps): update flake.lock" # Title of PR to be created
20+
pr-labels: | # Labels to be set on the PR
21+
dependencies
22+
automated
23+
commit-msg: "chore(deps): update flake.lock"
24+
- uses: reitermarkus/automerge@v2
25+
with:
26+
token: ${{ secrets.PAT }}
27+
merge-method: squash
28+
pull-request: ${{ github.event.inputs.pull-request }}

0 commit comments

Comments
 (0)