Assemble the files within a source directory into an Alfred workflow single package ready to be distributed.
The name of the output file is generated from the workflow name and version contained in the workflow's metadata.
This action needs a file named info.plist
with the metadata of your workflow in the root of your repo. This file is automatically generated for you when exporting workflows via the Alfred GUI.
workflow_dir
: Directory containing the sources of the workflow (defaults toworkflow
)exclude_patterns
: List of excluded files/directories (optional)custom_version
: String that will override the workflow version, e.g. a git tag (optional)
workflow_file
: The name of the created .alfredworkflow file
On every push
to a tag matching the pattern v*
, create a release with the workflow file attached:
name: Create Alfred Workflow
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build Alfred workflow
id: builder
uses: almibarss/build-alfred-workflow@v1
with:
workflow_dir: src
exclude_patterns: '*.pyc *__pycache__/*'
custom_version: ${{ github.ref_name }}
- name: Release
uses: softprops/action-gh-release@v1
with:
files: ${{ steps.builder.outputs.workflow_file }}
In addition to the files and folders contained in the workflow_dir
some other files are also implicitily shipped within the target workflow_file
. These files are searched for in the root directory and are silently ignored in case they don't exist:
-
info.plist
(required) -
icon.png
-
README
,README.md
-
LICENSE