Skip to content

Commit 5f25f6d

Browse files
ci: Set up dev and tag luarocks release workflow (#801)
1 parent 4616941 commit 5f25f6d

File tree

5 files changed

+56
-58
lines changed

5 files changed

+56
-58
lines changed

.github/workflows/luarocks.yml

+8-13
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,19 @@
11
name: Push to Luarocks
22

33
on:
4-
push:
5-
tags:
6-
- '*'
7-
release:
8-
types:
9-
- created
10-
pull_request: # Runs test install without uploading
11-
workflow_dispatch: # Allows to trigger manually
4+
workflow_call:
5+
inputs:
6+
luarocks_version:
7+
type: string
8+
required: true
129

1310
jobs:
14-
luarocks-upload:
11+
upload:
1512
runs-on: ubuntu-latest
1613
steps:
1714
- uses: actions/checkout@v4
1815
with:
19-
fetch-depth: 0 # Required to count the commits
20-
- name: Get Version
21-
run: echo "LUAROCKS_VERSION=$(git describe --abbrev=0 --tags)" >> $GITHUB_ENV
16+
fetch-depth: 0
2217
- name: Install C/C++ Compiler
2318
uses: rlalik/setup-cpp-compiler@master
2419
with:
@@ -41,6 +36,6 @@ jobs:
4136
env:
4237
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
4338
with:
44-
version: ${{ env.LUAROCKS_VERSION }}
39+
version: ${{ inputs.luarocks_version }}
4540
dependencies: |
4641
tree-sitter-orgmode ~> 1

.github/workflows/luarocks_dev.yml

-39
This file was deleted.

.github/workflows/release.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Push release to Luarocks
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
release:
8+
types:
9+
- created
10+
workflow_dispatch:
11+
12+
jobs:
13+
tests:
14+
uses: ./.github/workflows/tests.yml
15+
version:
16+
needs: tests
17+
runs-on: ubuntu-latest
18+
outputs:
19+
luarocks_version: ${{ steps.get_version.outputs.LUAROCKS_VERSION }}
20+
steps:
21+
- uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0 # Required to count the commits
24+
- name: Get Version
25+
id: get_version
26+
run: echo "LUAROCKS_VERSION=$(git describe --abbrev=0 --tags)" >> $GITHUB_OUTPUT
27+
luarocks:
28+
needs: version
29+
uses: ./.github/workflows/luarocks.yml
30+
with:
31+
luarocks_version: ${{ needs.version.outputs.luarocks_version }}

.github/workflows/release_dev.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: dev
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request: # Luarocks upload only tests installation
8+
9+
jobs:
10+
tests:
11+
uses: ./.github/workflows/tests.yml
12+
luarocks_dev:
13+
needs: tests
14+
uses: ./.github/workflows/luarocks.yml
15+
with:
16+
luarocks_version: dev

.github/workflows/tests.yml

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
name: tests
22

33
on:
4-
push:
5-
branches:
6-
- master
7-
pull_request:
8-
branches:
9-
- master
4+
workflow_call:
105

116
env:
127
CI: true

0 commit comments

Comments
 (0)