Skip to content

Commit 2b3830e

Browse files
committed
docs: Updated README
1 parent 31079ed commit 2b3830e

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

README.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@ This action was inspired by [latest-tag](https://github.com/EndBug/latest-tag) a
2525

2626
You should use this action in a workflow immediately after checkout. The following outputs will be set:
2727

28-
- `version` - version from package.json
29-
- `tags` - reverse sorted git tags in semver format
30-
- `nextVersion` - calculated next version (see table above)
31-
- `nextTag` - calculated next version, prefixed (see below)
32-
- `isPrerelease` - true if pre-release, false otherwise.
28+
- `version` - version in package.json
29+
- `tags` - git tags in semver format
30+
- `nextVersion` - computed next version (see table above)
31+
- `nextTag` - computed next version, prefixed (see below)
32+
- `isBump` - true if computed next version differs from version in package.json, false otherwise
33+
- `isPrerelease` - true if pre-release, false otherwise
3334

3435
For inputs, the following options are available:
3536

@@ -43,11 +44,16 @@ Example yml:
4344
fetch-depth: 0
4445
- name: Fetch next version
4546
id: nextVersion
46-
uses: freezy/[email protected]
47-
- name: Log version and next version
47+
uses: VisualPinball/[email protected]
48+
with:
49+
tagPrefix: 'v'
50+
- name: Log next version outputs
4851
run: |
4952
echo "${{ steps.nextVersion.outputs.version }}"
5053
echo "${{ steps.nextVersion.outputs.nextVersion }}"
54+
echo "${{ steps.nextVersion.outputs.nextTag }}"
55+
echo "${{ steps.nextVersion.outputs.isBump }}"
56+
echo "${{ steps.nextVersion.outputs.isPrerelease }}"
5157
```
5258
5359
**Note:** For this action to work properly, make sure to configure `actions/checkout@v2` with a `fetch-depth: 0`.
@@ -79,7 +85,5 @@ $ npm test
7985
√ should use major version from major package.json if no tag matched
8086
√ should use pre-release version from pre-release package.json if no tag matched
8187
√ should bump final version if tag already exists and ends with 0
82-
√ should throw an error if final version is already tagged and does not end with 0 (9ms)
83-
√ should throw an error if pre-release version is already tagged and does not end with 0
8488
√ should throw an error for wrong versions (2ms)
8589
```

0 commit comments

Comments
 (0)