https://github.com/mikybars/build-alfred-workflow
A GitHub Action to package Alfred workflows
https://github.com/mikybars/build-alfred-workflow
Last synced: 4 months ago
JSON representation
A GitHub Action to package Alfred workflows
- Host: GitHub
- URL: https://github.com/mikybars/build-alfred-workflow
- Owner: mikybars
- License: mit
- Created: 2020-03-20T15:36:08.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2023-01-03T14:28:43.000Z (about 2 years ago)
- Last Synced: 2024-10-17T12:56:02.683Z (4 months ago)
- Language: Python
- Homepage: https://github.com/marketplace/actions/build-an-alfred-workflow
- Size: 5.86 KB
- Stars: 23
- Watchers: 3
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Build an Alfred workflow
Assemble the files within a source directory into an [Alfred workflow](https://www.alfredapp.com/workflows/) 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.
## Usage
### Pre-requisites
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](https://www.alfredapp.com/help/workflows/advanced/sharing-workflows/) via the Alfred GUI.
### Inputs
* `workflow_dir`: Directory containing the sources of the workflow (defaults to `workflow`)
* `exclude_patterns`: List of excluded files/directories (optional)
* `custom_version`: String that will override the workflow version, e.g. a git tag (optional)### Outputs
* `workflow_file`: The name of the created .alfredworkflow file
### Example workflow
On every `push` to a tag matching the pattern `v*`, [create a release](https://github.com/marketplace/actions/gh-release) with the workflow file attached:
```yaml
name: Create Alfred Workflowon:
push:
tags:
- 'v*'jobs:
build:
runs-on: ubuntu-lateststeps:
- 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 }}
```## Additional files
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`