-
Notifications
You must be signed in to change notification settings - Fork 23
62 lines (60 loc) · 1.44 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: ci
on:
push:
paths:
- '**.lua'
tags:
- '[0-9]+.[0-9]+.[0-9]+'
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Lint
uses: nebularg/actions-luacheck@v1
with:
annotate: warning
args: --no-color
test:
runs-on: ubuntu-latest
needs: lint
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Install Lua
uses: leafo/gh-actions-lua@v10
with:
luaVersion: '5.1.5'
- name: Install LuaRocks
uses: leafo/gh-actions-luarocks@v4
- name: Install Dependencies
run: |
luarocks install luabitop
luarocks install busted
- name: Test
run: |
cd ./tests
busted -o TAP .
release:
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Prepare Packager Arguments
id: packager-args
if: github.base_ref || github.ref_type != 'tag'
run: echo '::set-output name=args::-d'
- name: Package and Release
uses: BigWigsMods/packager@v2
with:
args: ${{ steps.packager-args.outputs.args }}
env:
CF_API_KEY: ${{ secrets.CF_API_KEY }}
GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }}