You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](CODE_OF_CONDUCT.md)
7
8
8
9
A GitHub Action to automatically bump versions for any project that has a version file.
9
10
10
-
This action will automatically detect the version file (e.g. `package.json`, `pyproject.toml`, etc.) and bump the version according to the `release_type` input. If multiple version files are found, the action will use the one that is most commonly used for the project type.
11
+
This action will automatically detect the version file and bump the version according to the `release_type` input. If multiple version files are found, the action will use the one that is most commonly used for the project type.
12
+
13
+
## How it works
14
+
15
+
The action will first try to detect the platform of the project by looking for common version files in the root directory. The following files are supported:
16
+
17
+
| Platform | Version File |
18
+
| --- | --- |
19
+
| Docker |`Dockerfile`|
20
+
| Go |`go.mod`|
21
+
| Node |`package.json`|
22
+
| PHP |`composer.json`|
23
+
| Python |`pyproject.toml`, `setup.py`|
24
+
| Rust |`Cargo.toml`|
25
+
26
+
If a version file is found, the action will bump the version in that file. If no version file is found, the action will fail.
27
+
28
+
You can also explicitly specify the platform to update by using the `target_platform` input. This is useful for monorepos or projects with multiple potential manifest files.
11
29
12
30
## Usage
13
31
@@ -20,31 +38,21 @@ To use this action in your workflow, add the following step:
| `release_type` | Select the version bump type (patch, minor, major) | `patch` |
28
-
| `git_tag` | Whether to create a Git tag after bump | `true` |
29
-
| `target_platform` | Explicitly specify the platform to update (e.g., `node`, `python`). If not provided, the platform will be detected automatically. | `''` |
30
-
| `target_path` | The target path where the version bump should be applied. If not provided, the action will run in the root directory. | `.` |
To bump a version in a specific directory, use the `target_path` input:
33
44
34
-
By default, the action automatically detects the project's platform based on common manifest files (e.g., `package.json` for Node.js, `pyproject.toml` for Python). However, in certain scenarios, such as monorepos or projects with multiple potential manifest files, you might want to explicitly control which platform's version is bumped.
35
-
36
-
The `target_platform` input allows you to specify the exact platform you intend to update. When this input is provided, the action will bypass its automatic detection and directly attempt to update the version for the specified platform.
| `release_type` | Select the version bump type (patch, minor, major) | `patch` |
70
+
| `git_tag` | Whether to create a Git tag after bump | `true` |
71
+
| `target_platform` | Explicitly specify the platform to update (e.g., `node`, `python`). If not provided, the platform will be detected automatically. | `''` |
72
+
| `target_path` | The target path where the version bump should be applied. If not provided, the action will run in the root directory. | `.` |
0 commit comments