A GitHub Action for Wesnoth add-ons.
Verifies project resources using the wmlscope
tool from a partially
cloned Wesnoth repository.
Create a .github/workflows
folder in your GitHub repository.
Add a workflow that triggers this action. For more info, see
the following examples of GitHub workflows.
The Wesnoth version that the resources are checked against can
be specified with the wesnoth-version
parameter. It can match
any Wesnoth branch
or tag.
The folder or file that should be validated can be specified with
the path
parameter. By default, the entire project will be verified.
Command line flags passed to the wmlscope
tool can be specified
with the flags
parameter. By default, the -u
flag is passed,
so that unresolved macro references and other issues within WML files
are reported. When overriding the default value, consider adding -u
for a in-depth issues report. See the wmlscope
documentation
for a complete list of supported flags.
A workflow that verifies resources on every push to the repository, as well as every pull request:
name: check
on: [push, pull_request]
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Repository checkout
uses: actions/checkout@v2
- name: Verify resources scope
uses: czyzby/wesnoth-wml-scope@v1
A workflow that verifies resources in the units/
folder against
Wesnoth 1.16 wmlscope
with custom flags on every push or pull
request to a specific branch:
name: check
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Repository checkout
uses: actions/checkout@v2
- name: Verify resources scope
uses: czyzby/wesnoth-wml-scope@v1
with:
path: units/
wesnoth-version: 1.16
flags: --unchecked
Use @v1
for the latest stable release. Use @latest
for the latest
version directly from the default development branch.
czyzby/wesnoth-wml-linter
: a GitHub Action that verifies WML files withwmllint
andwmlindent
.czyzby/wesnoth-png-optimizer
: a GitHub Action that verifies if PNG images are optimized withwoptipng
.