Skip to content

Commit

Permalink
Merge a67f04b into fa4d058
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Sep 1, 2021
2 parents fa4d058 + a67f04b commit 21df52f
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 1 deletion.
66 changes: 66 additions & 0 deletions .github/workflows/deploy.yml
@@ -0,0 +1,66 @@
name: Deploy

on:
push:
paths:
- rockspecs/*.rockspec

jobs:

affected:
runs-on: ubuntu-20.04
outputs:
rockspecs: '["${{ steps.changed-files.outputs.all_modified_files }}"]'
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- id: changed-files
uses: tj-actions/changed-files@v1.0.2
with:
files: rockspecs/*.rockspec
separator: '", "'

build:
needs: affected
if: ${{ needs.affected.outputs.rockspecs }}
strategy:
fail-fast: false
matrix:
luaVersion: ["5.4", "5.3", "5.2", "5.1", "luajit", "luajit-openresty"]
luarocksVersion: ["3.1.3", "2.4.2"]
rockspec: ${{ fromJSON(needs.affected.outputs.rockspecs) }}
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup ‘lua’
uses: leafo/gh-actions-lua@v8
with:
luaVersion: ${{ matrix.luaVersion }}
- name: Setup ‘luarocks’
uses: leafo/gh-actions-luarocks@v4
with:
luarocksVersion: ${{ matrix.luarocksVersion }}
- name: Confirm rockspec builds
run: |
luarocks --lua-version ${{ matrix.luaVersion }} --local build -- ${{ matrix.rockspec }}
upload:
needs: [affected, build]
if: ${{ needs.affected.outputs.rockspecs && github.ref == '/refs/heads/master' }}
strategy:
fail-fast: false
matrix:
rockspec: ${{ fromJSON(needs.affected.outputs.rockspecs) }}
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup ‘lua’
uses: leafo/gh-actions-lua@v8
- name: Setup ‘luarocks’
uses: leafo/gh-actions-luarocks@v4
- run: |
luarocks upload --skip-pack --force --api-key ${{ github.LUAROCKS_APIKEY }} -- ${{ matrix.rockspec }}
21 changes: 21 additions & 0 deletions .github/workflows/luarocks.yml
@@ -0,0 +1,21 @@
name: Luarocks

on: [push, pull_request]

jobs:

luarocks:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup ‘lua’
uses: leafo/gh-actions-lua@v8
- name: Setup ‘luarocks’
uses: leafo/gh-actions-luarocks@v4
- name: Luarocks lint
run: |
luarocks --local lint -- cassowary-scm-0.rockspec
- name: Luarocks make
run: |
luarocks --local make -- cassowary-scm-0.rockspec
4 changes: 3 additions & 1 deletion rockspecs/cassowary-2.3.1-2.rockspec
@@ -1,9 +1,11 @@
rockspec_format = "1.0"
package = "cassowary"
version = "2.3.1-2"

source = {
url = "git://github.com/sile-typesetter/cassowary.lua",
tag = "v2.3.1"
tag = "v2.3.1",
dir = "cassowary.lua"
}

description = {
Expand Down

0 comments on commit 21df52f

Please sign in to comment.