mirror of https://github.com/pypa/hatch.git
257e27e51a | ||
---|---|---|
.github | ||
README.md | ||
action.yml | ||
main.sh |
README.md
Install Hatch Action
This is an action to install Hatch in your GitHub Actions workflow.
Usage
You must use this action in one of your jobs' steps:
- name: Install Hatch
uses: pypa/hatch@install
For strict security guarantees, it's best practice to pin the action to a specific commit (of the install
branch) like so:
- name: Install Hatch
uses: pypa/hatch@a3c83ab3d481fbc2dc91dd0088628817488dd1d5
Options
Name | Default | Description |
---|---|---|
version |
latest |
The version of Hatch to install (e.g. 1.11.1 ). |
External consumers
It's possible to use the install script outside of GitHub Actions assuming you set up your environment as follows:
- Set every option to an environment variable with uppercasing and replacing hyphens with underscores.
- Set the
RUNNER_TOOL_CACHE
environment variable to the directory where you want to install Hatch. - Set the
GITHUB_PATH
environment variable to a file that is writable which will contain the final directory where Hatch gets installed (usually$RUNNER_TOOL_CACHE/.hatch
). - Set the
RUNNER_OS
environment variable to the current platform using one of the following values:Linux
Windows
macOS
- Set the
RUNNER_ARCH
environment variable to the current architecture using one of the following values:X64
ARM64
- Install pipx as a fallback installation method for when there is no standalone binary available. In this case, nothing will be written to
GITHUB_PATH
.