forked from rhagelstrom/PowerUp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8572ce9
commit 6fab860
Showing
6 changed files
with
315 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
on: | ||
push: | ||
paths: | ||
- '**.lua' # Run if pushed commits include a change to a Lua (.lua) file. | ||
- 'extension.xml' # Run if pushed commits include a change to extension.xml. | ||
pull_request: | ||
paths: | ||
- '**.lua' # Run if pull request includes a change to a Lua (.lua) file. | ||
- 'extension.xml' # Run if pull request includes a change to extension.xml. | ||
workflow_dispatch: | ||
|
||
name: Run Luacheck | ||
|
||
jobs: | ||
getnames: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
# Determine extension name | ||
- name: Get Extension Name from XML | ||
id: getnamefromxml | ||
uses: mavrosxristoforos/get-xml-info@1.1.1 | ||
with: | ||
xml-file: 'extension.xml' | ||
xpath: '//properties//name' | ||
|
||
- name: Format Extension Name | ||
id: removenameprefix | ||
uses: ashley-taylor/regex-property-action@v1 | ||
with: | ||
value: ${{ steps.getnamefromxml.outputs.info }} | ||
regex: '[A-Za-z]+:\s+' | ||
replacement: '' | ||
|
||
- id: removeapostrophes | ||
uses: ashley-taylor/regex-property-action@v1 | ||
with: | ||
value: ${{ steps.removenameprefix.outputs.value }} | ||
regex: "'" | ||
replacement: '' | ||
|
||
- id: removenamepunctuation | ||
uses: ashley-taylor/regex-property-action@v1 | ||
with: | ||
value: ${{ steps.removeapostrophes.outputs.value }} | ||
regex: '[^\w\s].*' | ||
replacement: '' | ||
|
||
- id: removenamespaces | ||
uses: ashley-taylor/regex-property-action@v1 | ||
with: | ||
value: ${{ steps.removenamepunctuation.outputs.value }} | ||
regex: '\s' | ||
replacement: '' | ||
|
||
- id: namelowercase | ||
uses: ASzc/change-string-case-action@v5 | ||
with: | ||
string: ${{ steps.removenamespaces.outputs.value }} | ||
|
||
# Determine extension author | ||
- name: Get Extension Name from XML | ||
id: getauthorfromxml | ||
uses: mavrosxristoforos/get-xml-info@1.1.1 | ||
with: | ||
xml-file: 'extension.xml' | ||
xpath: '//properties//author' | ||
|
||
- name: Format author name | ||
id: removeauthorprefix | ||
uses: ashley-taylor/regex-property-action@v1 | ||
with: | ||
value: ${{ steps.getauthorfromxml.outputs.info }} | ||
regex: '[A-Za-z]+:\s' | ||
replacement: '' | ||
|
||
- id: removeauthorapostrophes | ||
uses: ashley-taylor/regex-property-action@v1 | ||
with: | ||
value: ${{ steps.removeauthorprefix.outputs.value }} | ||
regex: "'" | ||
replacement: '' | ||
|
||
- id: removeauthorpunctuation | ||
uses: ashley-taylor/regex-property-action@v1 | ||
with: | ||
value: ${{ steps.removeauthorapostrophes.outputs.value }} | ||
regex: '[^\w\s].*' | ||
replacement: '' | ||
|
||
- id: removeauthorspaces | ||
uses: ashley-taylor/regex-property-action@v1 | ||
with: | ||
value: ${{ steps.removeauthorpunctuation.outputs.value }} | ||
regex: '\s' | ||
replacement: '' | ||
|
||
- id: authorlowercase | ||
uses: ASzc/change-string-case-action@v5 | ||
with: | ||
string: ${{ steps.removeauthorspaces.outputs.value }} | ||
|
||
outputs: | ||
extension: ${{ steps.namelowercase.outputs.lowercase }} | ||
author: ${{ steps.authorlowercase.outputs.lowercase }} | ||
|
||
luacheck: | ||
runs-on: ubuntu-latest | ||
needs: getnames | ||
steps: | ||
- name: Checkout default branch | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Lua/LuaJIT | ||
uses: leafo/gh-actions-lua@v9 | ||
with: | ||
luaVersion: 5.1 | ||
|
||
# Process extension code | ||
- name: Running luacheck | ||
uses: nebularg/actions-luacheck@v1 | ||
with: | ||
files: '.' | ||
config: https://raw.githubusercontent.com/rhagelstrom/FG-luacheck/main/.luacheckrc | ||
args: '--no-color --std +${{ needs.getnames.outputs.extension }}${{ needs.getnames.outputs.author }} --exclude-files .install/*' | ||
annotate: 'warning' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,16 @@ | ||
<?xml version="1.0" encoding="iso-8859-1"?> | ||
|
||
<root release="3.0" version="3"> | ||
<announcement text="https://www.fantasygrounds.com/forums/showthread.php?74616-Power-Up\rPower Up v1.5 by Ryan Hagelstrom\rContribution: bmos 2022\rtype: /powerup /powerupman" icon="PowerUp" font="emotefont"/> | ||
<announcement text="https://www.fantasygrounds.com/forums/showthread.php?74616-Power-Up\rPower Up v1.6 by Ryan Hagelstrom\rContribution: bmos 2022-2023\rtype: /powerup /powerupman" icon="PowerUp" font="emotefont" /> | ||
<properties> | ||
<loadorder>10</loadorder> | ||
<loadorder>10</loadorder> | ||
<name>Feature: Power Up</name> | ||
<version>1.5</version> | ||
<version>1.6</version> | ||
<author>Ryan Hagelstrom</author> | ||
<description>Show what extensions have been updated since last campaign as well as some GM module managment of players</description> | ||
<description>Show what extensions have been updated since last campaign as well as some GM module management of players</description> | ||
</properties> | ||
<base> | ||
<script name="PowerUp" file="scripts/PowerUp.lua" /> | ||
<includefile source="strings/strings.xml" /> | ||
<includefile source="graphics/graphics.xml" /> | ||
</base> | ||
</base> | ||
</root> |
Oops, something went wrong.