Skip to content

Enable GitHub Action workflow to build and deploy to LuaRocks #97

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: build

on:
push:
branches: [ "master", "main" ]
pull_request:
branches: [ "master", "main" ]

jobs:
build:
runs-on: ubuntu-latest
env:
LUA_ROCKS_API_KEY: ${{ secrets.LUA_ROCKS_API_KEY }}

steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker-compose build test
- name: Run tests
run: docker-compose run --rm test
25 changes: 25 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: deploy

# How to fire this workflow
## After you are ready to deploy your rock, you need create a git tag in the format vX.Y-Z
## git tag vX.Y-Z && git push --tags

on:
push:
tags:
- 'v*.*-*'

jobs:
build:
uses: ./.github/workflows/build.yml
deploy:
name: Deploy rock to luarocks.org
needs: [ build ] # build must pass to deploy
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Deploy to luarocks.org
run: docker-compose build upload
env:
LUA_ROCKS_API_KEY: ${{ secrets.LUA_ROCKS_API_KEY }}
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
:numbered:
:unsafe:

= 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]
= 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]

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>]

Expand Down
4 changes: 2 additions & 2 deletions test.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM nickblah/lua:5.4-luarocks-ubuntu
FROM nickblah/lua:5.4.6-luarocks-ubuntu

RUN apt-get update -qq > /dev/null \
&& apt-get install build-essential git zip -qq > /dev/null \
&& luarocks install dkjson --local > /dev/null \
&& luarocks install dkjson > /dev/null \
&& luarocks install luacheck > /dev/null \
&& luarocks install luacov > /dev/null \
&& luarocks install luacov-coveralls > /dev/null \
Expand Down