Skip to content

Commit 84d73a7

Browse files
authored
Enable GitHub Action workflow to build and deploy to LuaRocks (PR #97)
* Delete .travis.yml * Remove travis badge * Create build.yml and deploy.yml * update test.Dockerfile --------- Signed-off-by: Manoel Campos <[email protected]>
1 parent 7e36b2e commit 84d73a7

File tree

5 files changed

+48
-26
lines changed

5 files changed

+48
-26
lines changed

.github/workflows/build.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches: [ "master", "main" ]
6+
pull_request:
7+
branches: [ "master", "main" ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
env:
13+
LUA_ROCKS_API_KEY: ${{ secrets.LUA_ROCKS_API_KEY }}
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Build the Docker image
18+
run: docker-compose build test
19+
- name: Run tests
20+
run: docker-compose run --rm test

.github/workflows/deploy.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: deploy
2+
3+
# How to fire this workflow
4+
## After you are ready to deploy your rock, you need create a git tag in the format vX.Y-Z
5+
## git tag vX.Y-Z && git push --tags
6+
7+
on:
8+
push:
9+
tags:
10+
- 'v*.*-*'
11+
12+
jobs:
13+
build:
14+
uses: ./.github/workflows/build.yml
15+
deploy:
16+
name: Deploy rock to luarocks.org
17+
needs: [ build ] # build must pass to deploy
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
- name: Deploy to luarocks.org
23+
run: docker-compose build upload
24+
env:
25+
LUA_ROCKS_API_KEY: ${{ secrets.LUA_ROCKS_API_KEY }}

.travis.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

README.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
:numbered:
33
:unsafe:
44

5-
= xml2lua image:https://travis-ci.com/manoelcampos/xml2lua.svg?branch=master[Build Status,link=https://travis-ci.com/manoelcampos/xml2lua] image:http://img.shields.io/badge/license-MIT-brightgreen.svg[MIT license,link=http://opensource.org/licenses/MIT] image:https://img.shields.io/luarocks/v/manoelcampos/xml2lua[LuaRocks,link=https://luarocks.org/modules/manoelcampos/xml2lua]
5+
= xml2lua image:http://img.shields.io/badge/license-MIT-brightgreen.svg[MIT license,link=http://opensource.org/licenses/MIT] image:https://img.shields.io/luarocks/v/manoelcampos/xml2lua[LuaRocks,link=https://luarocks.org/modules/manoelcampos/xml2lua]
66

77
pass:[<a href="https://buymeacoff.ee/manoelcampos" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: 30px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>]
88

test.Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
FROM nickblah/lua:5.4-luarocks-ubuntu
1+
FROM nickblah/lua:5.4.6-luarocks-ubuntu
22

33
RUN apt-get update -qq > /dev/null \
44
&& apt-get install build-essential git zip -qq > /dev/null \
5-
&& luarocks install dkjson --local > /dev/null \
5+
&& luarocks install dkjson > /dev/null \
66
&& luarocks install luacheck > /dev/null \
77
&& luarocks install luacov > /dev/null \
88
&& luarocks install luacov-coveralls > /dev/null \

0 commit comments

Comments
 (0)