Package a Textpattern plugin as a TXT package, and optionally add package to the release that triggered the workflow.
This action downloads and executes the Textpattern Plugin Packager (ais_txpplugin_packager to produce a plugin package.
Optionally, the resulting files (the TXT plugin package and its SHA-256 checksum file) can be added to the release triggering the workflow automatically.
Example workflows can be found here. Here is a simple example workflow (simplified from this example) that builds and releases a plugin package when you publish a release:
on:
release:
type: [published]
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check-out repository
uses: actions/checkout@v4
- name: Build and release package
uses: alieninternet/build-txpplugin-txt@v1
with:
release_files: 'true'Use the action from the GitHub actions marketplace by referencing alieninternet/build-txpplugin-txt@v1.
Folder containing the plugin files (should include manifest.json).
If not provided, it is assumed the plugin file is in the current working directory. If you haven't changed directory before calling this action, that would be the root of your repository.
Optional package filename.
If not provided, the action will read manifest.json from the specified plugin source folder and construct a filename as
<plugin name>_v<version>.txt, with dots in the version replaced by underscores.
If set to
true, automatically add the generated files to the release.
This option defaults to the repository scoped GitHub Token.
If you need more permissions for things such as deploying to another repository, you can add a Personal Access Token (PAT) here.