2023-11-17 21:31:12 +00:00
# Publish Action Package
2023-11-17 20:04:42 +00:00
2024-01-23 15:24:45 -05:00
_ This action _ packages _ your action _ as OCI artifacts and publishes it to the [GitHub Container registry ](ghcr.io ).
2023-11-17 20:04:42 +00:00
2024-01-30 16:13:51 +00:00
This allows your action to be consumed as an _ immutable _ package even if a [SemVer ](https://semver.org/ ) is specified in the consumer's workflow file.
2023-11-17 20:04:42 +00:00
2024-01-30 16:13:51 +00:00
Your action workflow must be triggered on `release` as in the following example. The release's title must follow [semantic versioning ](https://semver.org/ ).
Then consumers of your action will then be able to specify the version, e.g., `- uses: your-name/your-action@v1.2.3` or even `- uses: your-name/your-action@v1` .
2023-11-17 20:04:42 +00:00
2023-11-17 21:31:12 +00:00
## Usage
2023-11-17 20:04:42 +00:00
<!-- start usage -->
``` yaml
on :
release :
2024-01-23 15:24:45 -05:00
- uses : immutable-actions/publish-action-package@v1
2023-11-17 20:04:42 +00:00
with :
# Relative path of the working directory of the repository to be tar archived
# and uploaded as OCI Artifact layer. You can mention multiple files/folders
# by mentioning relative paths as space separated values.
#
# This defaults to the entire action repository contents if not explicitly defined.
# Default: '.'
path : 'src/ action.yml dist/'
```
<!-- end usage -->
2023-11-17 21:31:12 +00:00
## License
2023-11-17 20:04:42 +00:00
2024-01-23 15:24:45 -05:00
The scripts and documentation in this project are released under the [MIT License ](LICENSE ).