Skip to content

Commit 5286c12

Browse files
mjohanse-emrMichael Johansen
andauthored
Set expected-version to release.tag_name for release events. (#14)
Signed-off-by: Michael Johansen <[email protected]> Co-authored-by: Michael Johansen <[email protected]>
1 parent 49cd7a9 commit 5286c12

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

check-project-version/action.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ inputs:
66
default: ${{ github.workspace }}
77
expected-version:
88
description: >
9-
The expected version. By default, this is `github.ref_name`, which is the
10-
tag for a `release` event. If the version has a leading 'v', it will be
11-
stripped.
12-
default: ${{ github.ref_name }}
9+
The expected version. By default, this is `github.event.release.tag_name`
10+
for release events and `github.ref_name` otherwise. If the version has a
11+
leading 'v', it will be stripped.
12+
default: ${{ github.event_name == 'release' && github.event.release.tag_name || github.ref_name }}
1313
runs:
1414
using: composite
1515
steps:

0 commit comments

Comments
 (0)