From f832197eaa254fb7030df68b4146c1676852b992 Mon Sep 17 00:00:00 2001 From: Luca Capezzuto Date: Thu, 12 Jan 2023 20:42:39 +0100 Subject: [PATCH] Add issue template; set up Action to update Rockspec #542 --- .github/ISSUE_TEMPLATE/bug_report.md | 7 ++----- .github/workflows/main.yml | 27 +++++++++++++++++++++++---- lain-scm-1.rockspec | 6 ++++-- 3 files changed, 29 insertions(+), 11 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 49c0ca9..d4297ce 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,9 +1,6 @@ --- -name: Bug report -about: Create a report to help us improve -title: '' -labels: '' -assignees: '' +name: Bugs +about: Bugs and unintended behavior --- diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 37957f6..3193e0b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,9 +9,28 @@ jobs: linting: runs-on: ubuntu-latest steps: - - run: echo "Running tests triggered by a ${{ github.event_name }} event." - - run: echo "Testing ${{ github.ref }} from ${{ github.repository }} on ${{ runner.os }}" - - name: Check out code + - name: Checkout uses: actions/checkout@v3 - - name: Run tests + + - name: Luacheck linter uses: lunarmodules/luacheck@v0 + + rockspec: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: leafo/gh-actions-lua@v9 + - uses: leafo/gh-actions-luarocks@v4 + + - name: Update Rockspec + shell: bash + env: + LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }} + run: | + if [[ $(git diff *.rockspec | grep "+version") ]] + then + echo "Rockspec changed, uploading to LuaRocks.org" + luarocks upload *.rockspec --api-key "$LUAROCKS_API_KEY" + else + echo "Rockspec unchanged, nothing to do" + fi diff --git a/lain-scm-1.rockspec b/lain-scm-1.rockspec index a596de1..57fd1f5 100644 --- a/lain-scm-1.rockspec +++ b/lain-scm-1.rockspec @@ -1,13 +1,15 @@ +rockspec_format = "3.0" package = "lain" version = "scm-1" source = { - url = "git+https://github.com/lcpz/lain.git", - tag = "master" + url = "git+https://github.com/lcpz/lain.git" } description = { summary = "Layout, widgets and utilities for Awesome WM", detailed = "Alternative layouts, asynchronous widgets and utility functions for Awesome WM. Non-Lua dependency: curl (for IMAP, MPD and weather widgets).", homepage = "https://github.com/lcpz/lain", + issues_url = "https://github.com/lcpz/lain/issues", + maintainer = "Luca Cpz", license = "GPL2" } dependencies = {