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
Copy file name to clipboardExpand all lines: README.md
+2-30Lines changed: 2 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@ A GH action for validating version tag sequences and ensuring compliance with ve
19
19
## Motivation
20
20
21
21
This action is designed to help maintainers and contributors ensure that version tags are sequenced correctly and comply with versioning standards. It can be used to prevent common issues such as:
22
+
- Duplicate version tags on input
22
23
- Missing version tags
23
24
- Incorrect version sequences
24
25
- Non-standard version formats
@@ -41,21 +42,6 @@ This action is designed to help maintainers and contributors ensure that version
41
42
-**Description**: The version tag to check for in the repository. Example: `v0.1.0`.
42
43
-**Required**: Yes
43
44
44
-
### `branch`
45
-
-**Description**: The branch to check for the version tag. Example: `master`.
46
-
-**Required**: Yes
47
-
48
-
### `fails-on-error`
49
-
-**Description**: Whether the action should fail if an error occurs.
50
-
-**Required**: No
51
-
-**Default**: `true`
52
-
53
-
## Outputs
54
-
55
-
### `valid`
56
-
-**Description**: Whether the version tag is valid.
57
-
-**Value**: `true` or `false`
58
-
59
45
## Usage
60
46
61
47
### Adding the Action to Your Workflow
@@ -73,10 +59,8 @@ See the default action step definition:
73
59
env:
74
60
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
75
61
with:
76
-
github-repository: "{ org }/{ repo }"
62
+
github-repository: "{ org }/{ repo }"# e.g. ${{ github.repository }}
("invalid_version", [], False, True, 1, "Tag does not match the required format"), # Invalid format
103
+
("invalid_version", [Version("v1.0.0")], False, True, 1, "Tag does not match the required format"), # Invalid format
104
+
("v1.0.3", [Version("v1.0.1")], True, False, 1, "New tag v1.0.3 is not one patch higher than the latest tag v1.0.1."), # Invalid increment
105
+
("v1.0.0", [Version("v1.0.0")], True, False, 1, "The tag already exists in repository"), # Existing tag
106
+
("v1.4.1", [Version("v2.0.0"), Version("v1.4.2")], True, False, 1, "New tag v1.4.1 is not one patch higher than the latest tag v1.4.2."), # Invalid backport increment
107
+
("1.0.0", [], False, True, 1, "Tag does not match the required format"), # Invalid format and increment
108
+
("v3.0.1", [Version("v2.9.9"), Version("v1.0.0")], True, False, 1, "New tag v3.0.1 is not a valid major bump. Latest version: v2.9.9."), # Invalid version gap
0 commit comments